Skip to content

Commit

Permalink
fix(useIntersectionObserver): targets length check (#2968)
Browse files Browse the repository at this point in the history
  • Loading branch information
schelmo committed Apr 14, 2023
1 parent 9225fc7 commit b95b621
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/core/useIntersectionObserver/index.ts
Expand Up @@ -76,7 +76,7 @@ export function useIntersectionObserver(
if (!isActive.value)
return

if (targets.length)
if (!targets.length)
return

const observer = new IntersectionObserver(
Expand Down

0 comments on commit b95b621

Please sign in to comment.