Skip to content

Commit

Permalink
correct unobserve
Browse files Browse the repository at this point in the history
  • Loading branch information
snewcomer committed Aug 21, 2018
1 parent 63be08f commit fb926ec
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions addon/services/-observer-admin.js
Original file line number Diff line number Diff line change
Expand Up @@ -60,12 +60,9 @@ export default class ObserverAdmin extends Service {
* @param {Node|window} root
*/
unobserve(element, observerOptions) {
let elements = this._findMatchingRootEntry(observerOptions);
let { intersectionObserver } = this._findMatchingRootEntry(observerOptions);

if (elements.length > 0) {
let { intersectionObserver } = elements[0];
intersectionObserver.unobserve(element);
}
intersectionObserver.unobserve(element);
}

/**
Expand Down

0 comments on commit fb926ec

Please sign in to comment.