Skip to content

Commit

Permalink
fix(animations): update comment
Browse files Browse the repository at this point in the history
add relevant details to do not refactor
  • Loading branch information
basherr committed Nov 14, 2020
1 parent 5869d82 commit 56daadd
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion packages/animations/browser/src/render/shared.ts
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,10 @@ if (_isNode || typeof Element !== 'undefined') {
_query = (element: any, selector: string, multi: boolean): any[] => {
let results: any[] = [];
if (multi) {
// DO NOT REFACTOR. It will throw callstack error on "spread(...)" push for greater node-list.
// DO NOT REFACTOR TO USE SPREAD SYNTAX.
// For element queries that return sufficiently large NodeList objects,
// using spread syntax to populate the results array causes a RangeError
// due to the call stack limit being reached.
// See following issue: #38551
const elems = element.querySelectorAll(selector);
for (let i = 0; i < elems.length; i++) {
Expand Down

0 comments on commit 56daadd

Please sign in to comment.