Skip to content
This repository has been archived by the owner on Jul 30, 2018. It is now read-only.

Intersection Meta fails for multiple nodes #727

Closed
smhigley opened this issue Oct 19, 2017 · 0 comments
Closed

Intersection Meta fails for multiple nodes #727

smhigley opened this issue Oct 19, 2017 · 0 comments
Assignees
Milestone

Comments

@smhigley
Copy link
Contributor

Bug

Intersection Meta will always return the default intersection for all but the first node observed by a root element. Lines 56-60 currently check if any observer at all exists on the root node, and only calls .observe(node) if not:

let details = this._getDetails(options);
if (!details) {
    details = this._createDetails(options, rootNode);
    details.observer.observe(node);
}

I believe this would be fixed with:

let details = this._getDetails(options);
if (!details || !details.entries.get(node)) {
    details = this._createDetails(options, rootNode);
    details.observer.observe(node);
}
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants