You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In version 1.7.3, the native Array.from is overwritten by $A as below:
function $A(iterable) {
if (!iterable) return [];
if ('toArray' in Object(iterable)) return iterable.toArray();
var length = iterable.length || 0, results = new Array(length);
while (length--) results[length] = iterable[length];
return results;
}
Array.from = $A;
From the definition of these two functions:
The Array.from() method creates a new Array instance from an array-like or iterable object.
However, the $A function only accepts an array-like collection (anything with numeric indices).
So $A is not able to handle other iterable objects without numeric indices such as MapIterator.
When $A try to create a new array by reading the iterable.length which does exist in some native iterable objects such as MapIterator, the result will be an array with length 0 returned back.
Hope this will be fixed soon.
Thanks,
Max
lnaravindan, brucemead, mwgamble, rcurrington, devmanda and 8 more