Unobserve status on unmount (#3851)
This commit is contained in:
parent
4367443287
commit
cf6fe4f8cb
2 changed files with 17 additions and 0 deletions
|
@ -37,6 +37,13 @@ class IntersectionObserverWrapper {
|
|||
}
|
||||
}
|
||||
|
||||
unobserve (id, node) {
|
||||
if (this.observer) {
|
||||
delete this.callbacks[id];
|
||||
this.observer.unobserve(node);
|
||||
}
|
||||
}
|
||||
|
||||
disconnect () {
|
||||
if (this.observer) {
|
||||
this.observer.disconnect();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue