We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent abef39b commit 4979d33Copy full SHA for 4979d33
src/scrollToTop.ts
@@ -6,7 +6,7 @@ export function scrollToTop() {
6
const t = document.documentElement.scrollTop || document.body.scrollTop
7
if (pre === undefined)
8
pre = t
9
- if ((pre < t && t < pre * 8 / 7) || t === 0)
+ if ((pre < t && (pre * 8) / 7 !== t) || t === 0)
10
stop()
11
window.scrollTo(0, pre = 7 * t / 8)
12
}, 0)
0 commit comments