Skip to content

Commit

Permalink
feat: fix getScrollTop
Browse files Browse the repository at this point in the history
  • Loading branch information
ljjcherryli committed Aug 7, 2023
1 parent facb0a2 commit 0942ecf
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/hooks/src/utils/rect.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
const getScrollTop = (el: Document | Element) => {
if (el === document|| el === document.documentElement || el === document.body) {
if (el === document || el === document.documentElement || el === document.body) {
return Math.max(
window.pageYOffset,
document.documentElement.scrollTop,
Expand Down

0 comments on commit 0942ecf

Please sign in to comment.