From 338d420c2c66c4c29a49eed47976fa942bb9996d Mon Sep 17 00:00:00 2001 From: Daniel Freedman Date: Thu, 16 May 2019 13:56:31 -0700 Subject: [PATCH] Use Array.from instead of a list comprehension --- lib/utils/scope-subtree.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/utils/scope-subtree.js b/lib/utils/scope-subtree.js index 1ec29e5bcf..7932d27f81 100644 --- a/lib/utils/scope-subtree.js +++ b/lib/utils/scope-subtree.js @@ -41,8 +41,8 @@ export function scopeSubtree(container, shouldObserve = false) { const scopify = (node) => { // NOTE: native qSA does not honor scoped DOM, but it is faster, and the same behavior as Polymer v1 - const descendants = ShadyDOM['nativeMethods']['querySelectorAll'].call(node, '*'); - const elements = [node, ...descendants]; + const elements = Array.from(ShadyDOM['nativeMethods']['querySelectorAll'].call(node, '*')); + elements.push(node); for (let i = 0; i < elements.length; i++) { const el = elements[i]; const currentScope = ScopingShim['currentScopeForNode'](el);