Skip to content

Commit

Permalink
Use math.ceil for calculation.
Browse files Browse the repository at this point in the history
  • Loading branch information
amovar18 committed Dec 27, 2024
1 parent b14f1e2 commit 887f548
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion assets/amp/custom-scripts/amp-player-main.js
Original file line number Diff line number Diff line change
Expand Up @@ -200,7 +200,7 @@ const sendEventToParent = () => {

function scrollListener() {
if (
window.scrollY + window.innerHeight >=
Math.ceil(window.scrollY + window.innerHeight) >=
document.documentElement.scrollHeight
) {
sendEventToParent();
Expand Down

0 comments on commit 887f548

Please sign in to comment.