You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Create a Set with the previously created array as one of its elements.
Nest 2 produce calls, with second call producing from draft of outer producer.
Inside nested producer, delete the array from the set.
Observed behavior
The code never returns and gets stuck. Note: This doesn't happen with numbers (instead of arrays, please check sandbox example). Also does not happen if provided array is not inserted in the Set.
Expected behavior
Code should return Set with removed element.
Environment
We only accept bug reports against the latest Immer version.
Immer version:
I filed this report against the latest version of Immer
Occurs with setUseProxies(true)
Occurs with setUseProxies(false) (ES5 only)
The text was updated successfully, but these errors were encountered:
@mweststrate I faced a similar issue too. I was able to "fix" the sandbox crash it by opening the preview in Firefox (it has a stop script button). Also needed to save all files and reload the preview twice consecutively. That may be the same reason why the sandbox is crashing for you.
As for reproducing the bug outside of the sandbox, it first happened when I was testing some code in Karma (same bug behavior)
Added a fix that will address the crash, but I don't think the double produce nesting in the end does what you might expect here, so it might need a revisit
馃悰 Bug Report
When removing an array from a Set inside nested producers, the code will hang.
Link to repro
https://codesandbox.io/s/immer-bug-2qsbe?file=/src/index.ts
To Reproduce
Observed behavior
The code never returns and gets stuck. Note: This doesn't happen with numbers (instead of arrays, please check sandbox example). Also does not happen if provided array is not inserted in the Set.
Expected behavior
Code should return Set with removed element.
Environment
We only accept bug reports against the latest Immer version.
setUseProxies(true)
setUseProxies(false)
(ES5 only)The text was updated successfully, but these errors were encountered: