Skip to content

Commit

Permalink
fix: handle dom-if in _isDescendantOfElementInstance
Browse files Browse the repository at this point in the history
  • Loading branch information
megheaiulian authored and nomego committed Mar 16, 2020
1 parent f3c1aa6 commit 408b258
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions cosmoz-data-nav.js
Original file line number Diff line number Diff line change
Expand Up @@ -909,10 +909,14 @@ class CosmozDataNav extends translatable(mixinBehaviors([IronResizableBehavior],
if (!instance) {
return false;
}

return instance.children
.filter(c => c.nodeType === Node.ELEMENT_NODE)
.some(child => this._isDescendantOf(descendant, child));
.some(child => {
if (child.tagName === 'DOM-IF') {
return this._isDescendantOfElementInstance(descendant, child);
}
return this._isDescendantOf(descendant, child);
});
}

/**
Expand Down

0 comments on commit 408b258

Please sign in to comment.