Closed zloirock closed 9 years ago
About https://github.com/paulmillr/es6-shim/commit/bdd9804ddede0515b34646959d409c3c7a259e61 / https://github.com/kangax/compat-table/issues/453
By spec, ArraySpeciesCreate shoud create instance arrayLike.constructor / arrayLike.constructor[@@spicies] only if arrayLike is array, see steps 4-7.
arrayLike.constructor
arrayLike.constructor[@@spicies]
arrayLike
Current implementation different from spec and breaks old code - for example, [].slice.call(document.getElementsByTagName('div')) throws error.
[].slice.call(document.getElementsByTagName('div'))
Unpublished v0.27.0 from npm pending this issue.
v0.27.0
npm
After rereading the spec algorithm, I think that perhaps this isn't shimmable. I'm going to revert this for now and revisit it in the future.
About https://github.com/paulmillr/es6-shim/commit/bdd9804ddede0515b34646959d409c3c7a259e61 / https://github.com/kangax/compat-table/issues/453
By spec, ArraySpeciesCreate shoud create instance
arrayLike.constructor
/arrayLike.constructor[@@spicies]
only ifarrayLike
is array, see steps 4-7.Current implementation different from spec and breaks old code - for example,
[].slice.call(document.getElementsByTagName('div'))
throws error.