diff --git a/lib/core/utils/flattened-tree.js b/lib/core/utils/flattened-tree.js index cc324c77c3..e07a6b7a5b 100644 --- a/lib/core/utils/flattened-tree.js +++ b/lib/core/utils/flattened-tree.js @@ -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 (