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
List.delete() returns an empty array #1901
Comments
I have the exact same problem, version is 3.8.2. P.S. |
Hi ! I do not know why for now, but in the delete documentation, you can read that:
So it's not considered as a bug. But we should either authorized this, if possible, or improve de DX there. You can see Lee's response here : #228 (comment) |
Hi @jdeniau |
@georg-getz If you have another solution (like not using I do not know that exact part, but as Lee only updated the doc, I think that it might be really difficult to make it work. I think that a possible "solution" may be to log a warning or mark this comportment as |
Dear developers.
I'm using Immutable.js v4.0.0 with Vue 3.2.29 + typescript
The
arrayOfItems.value
is aList
of objects and it contains 7 items and theindex
variable is 5.If I run the following code:
arrayOfItems.value = arrayOfItems.value.withMutations(x => {x.delete(index);});
then I get the empty array instead of the array that excludes object by index only.
arrayOfItems.value
andx
will be equal[]
after invokingdelete
. The behaviour ofremove
method is the same.It seems that its a wrong behaviour.
The text was updated successfully, but these errors were encountered: