We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
I would expect the following code
Immutable.Range(0, 10).filter($ => true).slice(-2).toArray()
to return
[8, 9]
but instead it returns
[0, 1, 2, 3, 4, 5, 6, 7, 8, 9]
i.e. the slice operation is ignored.
If you remove the filter operation, the slice works as expected.
If you slice with a positive begin value, it works as expected.
Run the above code snippets in the Chrome debug console on the immutable-js.com website, which embeds the Immutable library.
The text was updated successfully, but these errors were encountered:
just confirming.
Sorry, something went wrong.
You are right, this is a bug. I will try to address that when I have the time.
If you are willing to investigate in the code to fix this, I would gladly accept a PR.
No branches or pull requests
What happened
I would expect the following code
Immutable.Range(0, 10).filter($ => true).slice(-2).toArray()
to return
[8, 9]
but instead it returns
[0, 1, 2, 3, 4, 5, 6, 7, 8, 9]
i.e. the slice operation is ignored.
If you remove the filter operation, the slice works as expected.
If you slice with a positive begin value, it works as expected.
How to reproduce
Run the above code snippets in the Chrome debug console on the immutable-js.com website, which embeds the Immutable library.
The text was updated successfully, but these errors were encountered: