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鈥檒l occasionally send you account related emails.
Already on GitHub? Sign in to your account
clear Map produce incorrect patches
codebox link: https://codesandbox.io/s/immer-sandbox-forked-zz8le
immer/src/plugins/mapset.ts
Line 112 in bf90358
assigned_
each(state.assigned_)
immer/src/plugins/patches.ts
Lines 121 to 143 in bf90358
is this by design? or a bug.
just run the codesanbox link above
changes is a empty array.
changes
changes is [{ type: 'Remove', path: ['t2', 't'] }]
[{ type: 'Remove', path: ['t2', 't'] }]
We only accept bug reports against the latest Immer version.
setUseProxies(true)
setUseProxies(false)
The text was updated successfully, but these errors were encountered:
Looks like a bug indeed, PR welcome!
Sorry, something went wrong.
OK, I will submit a PR later.
fix: clear map creates invalid patches, fixes #663
bacc1e0
馃帀 This issue has been resolved in version 7.0.9 馃帀
The release is available on:
Your semantic-release bot 馃摝馃殌
Successfully merging a pull request may close this issue.
馃悰 Bug Report
clear Map produce incorrect patches
Link to repro
codebox link: https://codesandbox.io/s/immer-sandbox-forked-zz8le
immer source code
immer/src/plugins/mapset.ts
Line 112 in bf90358
this line clears the
assigned_
, and Patch Plugin gen patches depends oneach(state.assigned_)
immer/src/plugins/patches.ts
Lines 121 to 143 in bf90358
is this by design? or a bug.
To Reproduce
just run the codesanbox link above
Observed behavior
changes
is a empty array.Expected behavior
changes
is[{ type: 'Remove', path: ['t2', 't'] }]
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: