Skip to content

Commit

Permalink
update: fix delay when blog fading in
Browse files Browse the repository at this point in the history
  • Loading branch information
humbornjo committed Nov 2, 2024
1 parent ef4a008 commit dc3c0e3
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/scripts/animate.ts
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,9 @@ async function animation() {
? undefined
: ele.classList.remove("nobloger-animate");
}, 300); // fade in
await new Promise((r) => setTimeout(r, 75));
if ((ele as HTMLElement).style.getPropertyValue("display") !== "none") {
await new Promise((r) => setTimeout(r, 80));
}
}
}

Expand Down

0 comments on commit dc3c0e3

Please sign in to comment.