Skip to content

Commit

Permalink
fix: 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 7, 2023
1 parent 9d34afc commit a79de66
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 a79de66

Please sign in to comment.