Skip to content

Commit

Permalink
fix(components): [InfiniteScroll] error caused by value of el[SCOPE] (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
YiMo1 committed Apr 30, 2024
1 parent 9409cf1 commit 982640d
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions packages/components/infinite-scroll/src/index.ts
Expand Up @@ -162,6 +162,7 @@ const InfiniteScroll: ObjectDirective<
container.addEventListener('scroll', onScroll)
},
unmounted(el) {
if (!el[SCOPE]) return
const { container, onScroll } = el[SCOPE]

container?.removeEventListener('scroll', onScroll)
Expand Down

0 comments on commit 982640d

Please sign in to comment.