Skip to content

Commit

Permalink
fix(useInfiniteScroll): prevent infinite load when v-show set false (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
wonderl17 committed Jun 28, 2023
1 parent 7a897e5 commit a4dfa5b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/core/useInfiniteScroll/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ export function useInfiniteScroll(
state.measure()

const el = toValue(element) as HTMLElement
if (!el)
if (!el || !el.offsetParent)
return

const isNarrower = (direction === 'bottom' || direction === 'top')
Expand Down

0 comments on commit a4dfa5b

Please sign in to comment.