Skip to content

Commit

Permalink
chore: format
Browse files Browse the repository at this point in the history
  • Loading branch information
sxzz committed Sep 4, 2022
1 parent 4f7bd3b commit cce1bc7
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions packages/core/useElementVisibility/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,11 @@ export function useElementVisibility(
{ immediate: true, flush: 'post' },
)

if (window)
useEventListener(scrollTarget || window, 'scroll', testBounding, { capture: false, passive: true })
if (window) {
useEventListener(scrollTarget || window, 'scroll', testBounding, {
capture: false, passive: true,
})
}

tryOnScopeDispose(() => stop())

Expand Down

0 comments on commit cce1bc7

Please sign in to comment.