Skip to content

Commit ba24221

Browse files
author
Simon he
committed
fix: scrollToTop
1 parent 2b567ce commit ba24221

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/scrollToTop.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ export function scrollToTop() {
66
const t = document.documentElement.scrollTop || document.body.scrollTop
77
if (pre === undefined)
88
pre = t
9-
if ((pre + 5 < t && t < pre * 8 / 7) || t === 0)
9+
if ((pre < t && t < pre * 8 / 7) || t === 0)
1010
stop()
1111
window.scrollTo(0, pre = 7 * t / 8)
1212
}, 0)

0 commit comments

Comments
 (0)