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鈥檒l occasionally send you account related emails.
Already on GitHub? Sign in to your account
Array out-of-range assignments are not picked up properly in IE 11 #638
Comments
Pretty sure the problem is solved if you don't use lodash.set. There is really no reason to use lodash.set if you are using immer. I'll expect |
@mweststrate here is codesandbox with the issue (w/o lodash): https://codesandbox.io/s/laughing-lovelace-rfxhc?file=/src/index.js
|
Any updates on this issue? |
Looks like a bug indeed. But note that out-of-range assignments are an anti pattern though (which is probably why nobody did run into this before). I recommend to use |
Thanks for the detailed report! |
馃帀 This issue has been resolved in version 7.0.7 馃帀 The release is available on: Your semantic-release bot 馃摝馃殌 |
馃悰 Bug Report
If my state is an object and I set a property to it of array with not existed index:
I get this as a result:
and if then I set some other array index that goes before the one I used previously:
I still get:
Whereas I would expect to get:
Additional context
It works fine in Chrome, Firefox, also when you first set index 1 then 2 (in my example I have the bug because I first set 2 then 1) and also it works as expected when you explicitly define the array with undefined values or something (like [undefined, undefined, undefined])
Environment
IE11
Immer version 6+
The text was updated successfully, but these errors were encountered: