Skip to content

Commit c1cf22e

Browse files
author
Simon he
committed
chore: update
1 parent b6bc40d commit c1cf22e

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 < t || t === 0)
9+
if (pre + 5 < t || t === 0)
1010
stop()
1111
window.scrollTo(0, pre = t - t / 8)
1212
}, 0)

0 commit comments

Comments
 (0)