Closed AStoker closed 8 years ago
A quick look at the code, it seems to me that the bug was on line 32, where the iter
parameter was missing.
L32: iterCall(mapfn, step.value, index)
should have been
iterCall(iterator, mapfn, step.value, index)
Thanks for clearing things up. That was one of the things that was wrong, but we also needed to return the result of the map function too, otherwise it'll set each result of the array to be undefined. I'll get that update in real quick.
How do those changes look @jods4?
You are right, the return was missing as well. Looks good to me now.
@EisenbergEffect, can we get this merged, pending your review?
Ok, it's merged. Give me another few minutes and I'll have a patch release out.
Issue referenced at: https://github.com/aurelia/polyfills/issues/4#issuecomment-246473333 Previous behavior resulted in errors thrown when passing a mapping function to the polyfill
Array.from
This allows you to properly allow a mapping function and a “thisArg” to follow spec listed (https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/from)