Skip to content

Commit

Permalink
fix(flatten-tree): do not call deprecated getDistributedNodes (#1577)
Browse files Browse the repository at this point in the history
  • Loading branch information
AdnoC authored and straker committed May 20, 2019
1 parent fbae36b commit 93d59f4
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion lib/core/utils/flattened-tree.js
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,10 @@ function flattenTree(node, shadowId) {
retVal.children = realArray.reduce(reduceShadowDOM, []);
return [retVal];
} else {
if (nodeName === 'content') {
if (
nodeName === 'content' &&
typeof node.getDistributedNodes === 'function'
) {
realArray = Array.from(node.getDistributedNodes());
return realArray.reduce(reduceShadowDOM, []);
} else if (
Expand Down

0 comments on commit 93d59f4

Please sign in to comment.