Skip to content

Commit

Permalink
fix(animations): replace copy of query selector NodeList from "spread…
Browse files Browse the repository at this point in the history
…" to "for"

avoid callstack error
  • Loading branch information
basherr committed Nov 14, 2020
1 parent d68cac6 commit 0451eb0
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions packages/animations/browser/src/render/shared.ts
Expand Up @@ -183,12 +183,13 @@ if (_isNode || typeof Element !== 'undefined') {
_query = (element: any, selector: string, multi: boolean): any[] => {
let results: any[] = [];
if (multi) {
results.push(...element.querySelectorAll(selector));
const elems = element.querySelectorAll(selector);
for (let i = 0; i < elems.length; i++) {
results.push(elems[i]);
}
} else {
const elm = element.querySelector(selector);
if (elm) {
results.push(elm);
}
results = elm ? [elm] : [];
}
return results;
};
Expand Down

0 comments on commit 0451eb0

Please sign in to comment.