Skip to content

Commit ad6a78b

Browse files
committed
parseFloat(el.style.opacity || 0)
1 parent a5a8141 commit ad6a78b

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

petitnote/template/basic/js/common.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -364,7 +364,7 @@ document.addEventListener("DOMContentLoaded", () => {
364364

365365
// フェードイン/フェードアウトを管理する関数
366366
const fade = (el, to, duration = 500) => {
367-
const startOpacity = parseFloat(el.style.opacity);
367+
const startOpacity = parseFloat(el.style.opacity || 0);
368368
let startTime = performance.now();
369369

370370
const fadeStep = (now) => {

0 commit comments

Comments
 (0)