mirror of
https://github.com/nuxt/nuxt.git
synced 2025-02-07 09:22:27 +00:00
chore: use a WeakMap
This commit is contained in:
parent
0e4e92b716
commit
3d88fce4c7
@ -18,7 +18,7 @@ export function useIntersectionObserver (options?: Partial<IntersectionObserverI
|
||||
}
|
||||
|
||||
let observer: IntersectionObserver | null = null
|
||||
const callbacks = new Map<Element, CallbackFn>()
|
||||
const callbacks = new WeakMap<Element, CallbackFn>()
|
||||
|
||||
const observe: ObserveFn = (element, callback) => {
|
||||
if (!observer) {
|
||||
|
Loading…
Reference in New Issue
Block a user