0
0
Fork 0

Unobserve status on unmount (#3851)

This commit is contained in:
alpaca-tc 2017-06-19 18:29:57 +09:00 committed by Eugen Rochko
parent 4367443287
commit cf6fe4f8cb
2 changed files with 17 additions and 0 deletions

View file

@ -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();