Open ecolui opened 1 year ago
Consider the following code.
const l_array = ['a', 'b', 'c']; const l_it = l_array[Symbol.iterator](); //convert to iterator var result = Array.from(l_it);
When that code is called from JavaScript's native Array.from, the result is ['a', 'b', 'c']
When that function is called from prototype.js Array.from, the result is [] https://github.com/prototypejs/prototype/blob/master/src/prototype/lang/array.js
This also breaks Google Maps (new today or very recently?). Removing the Array.from = $A line fixes Google Maps, but I'm not sure if I've broken any of my other ancient Prototype code.
Array.from = $A
Consider the following code.
When that code is called from JavaScript's native Array.from, the result is ['a', 'b', 'c']
When that function is called from prototype.js Array.from, the result is [] https://github.com/prototypejs/prototype/blob/master/src/prototype/lang/array.js