-
-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Map.update is broken? #1061
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
Comments
I've investigated this a bit. The problem seems to be:
|
Reviewed by @tolmasky.
This is an edge case to how See documentation discussion: http://facebook.github.io/immutable-js/docs/#/Map/updateIn
@tolmasky thanks for investigating, I added some additional tests for this case and unfortunately I think the changes you made would have broken them. Specifically, that first line you reference is handling the identity function case, and the second line - |
If the current behavior is what is intended, then I must say it is very surprising. I see that something is indeed mentioned under "updateIn", but the documentation for Map.update does not mention this. It should be mentioned there as well, and the line saying that update is
should be removed, since it's clearly not true. Thank you |
I agree this corner isn't a great one. I'm hoping to improve it in a future major version. In the meantime these are great documentation suggestions |
Immutable version 3.8.1
I must be doing something seriously wrong, or have missed something fundamental:
Why wasn't "hello" inserted into the map? According to the docs, update is:
Let's try running that instead:
That seemed to work just fine! So why didn't "update" work?
The text was updated successfully, but these errors were encountered: