Skip to content

Fix __spreadArray for non-concat-spreadables#155

Merged
DanielRosenwasser merged 1 commit intomainfrom
fixSpreadArrayForNonConcatSpreadables
Aug 11, 2021
Merged

Fix __spreadArray for non-concat-spreadables#155
DanielRosenwasser merged 1 commit intomainfrom
fixSpreadArrayForNonConcatSpreadables

Conversation

@rbuckton
Copy link
Copy Markdown
Contributor

@rbuckton rbuckton commented Aug 9, 2021

The __spreadArray helper uses Array.concat, which doesn't work with DOM NodeList or HTMLCollection. This changes the __spreadArray helper to fall back to Array.prototype.slice.call(from) to ensure the elements of from are concatenated properly.

Fixes #153

@DanielRosenwasser DanielRosenwasser merged commit ffb6938 into main Aug 11, 2021
@rbuckton rbuckton deleted the fixSpreadArrayForNonConcatSpreadables branch August 11, 2021 22:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Spread operator breaks on HTML Collection or NodeList with tslib@2.3.0

3 participants