Skip to content

Commit

Permalink
Use Array.from instead of a list comprehension
Browse files Browse the repository at this point in the history
  • Loading branch information
dfreedm committed May 16, 2019
1 parent e10019a commit 338d420
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/utils/scope-subtree.js
Expand Up @@ -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);
Expand Down

0 comments on commit 338d420

Please sign in to comment.