Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

Cannot slice SliceString with simple range #2

Open
cloudratha opened this issue Jun 27, 2019 · 0 comments · May be fixed by #3
Open

Cannot slice SliceString with simple range #2

cloudratha opened this issue Jun 27, 2019 · 0 comments · May be fixed by #3

Comments

@cloudratha
Copy link

When slicing a string with a simple start, stop range, it fails to render, throwing a join error.

new SliceString('hello')[[1,3]]; // Fails

Looking at the code, it looks like when a string is sliced without a step, we just call the native slice method. This by default returns a substring of that string, and not an Array.

Later on the instance check tries to join the string, which is an invalid method.

@cloudratha cloudratha linked a pull request Jun 27, 2019 that will close this issue
1 task
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 a pull request may close this issue.

1 participant