Skip to content

fix: allow spreading of strings within arrays #177

New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

jcfranco
Copy link

@jcfranco jcfranco commented May 17, 2022

Fixes #175

This restores array spreading for the following use case:

[..."foo"]; // ['f', 'o', 'o']

@rbuckton @DanielRosenwasser @weswigham First time contributing to this project, so please let me know if there's something I missed.

@ghost
Copy link

ghost commented May 17, 2022

CLA assistant check
All CLA requirements met.

@driskull
Copy link

driskull commented Jun 7, 2022

This would be nice! :)

@jcfranco
Copy link
Author

jcfranco commented Jul 7, 2022

friendly ping 😁

@rbuckton
Copy link
Contributor

rbuckton commented May 2, 2023

A simpler change might be if (ar || !(i in Object(from))) { to coerce the string to an object for use with in. We'd also need to make this change in TypeScript before we take it for tslib, however.

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

TypeError when spreadArray is used on a string containing an emoji/Unicode character
3 participants