Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Clearing empty Set&Map should be noop #680

Closed
3 tasks done
nifgraup opened this issue Oct 7, 2020 · 1 comment
Closed
3 tasks done

Clearing empty Set&Map should be noop #680

nifgraup opened this issue Oct 7, 2020 · 1 comment
Labels

Comments

@nifgraup
Copy link
Contributor

nifgraup commented Oct 7, 2020

🐛 Bug Report

To Reproduce

const { produce, enableMapSet } = require("immer");
enableMapSet();
const map = new Map();
const newMap = produce(map, draft => { draft.clear(); });
map === newMap

Observed behavior

false

Expected behavior

true

Environment

  • Immer version:
  • I filed this report against the latest version of Immer
  • Occurs with setUseProxies(true)
  • Occurs with setUseProxies(false) (ES5 only)
nifgraup added a commit to nifgraup/immer that referenced this issue Oct 9, 2020
nifgraup added a commit to nifgraup/immer that referenced this issue Oct 9, 2020
@aleclarson
Copy link
Member

🎉 This issue has been resolved in version 7.0.10 🎉

The release is available on:

Your semantic-release bot 📦🚀

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants