Skip to content
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

Method Set.prototype.forEach called on incompatible receiver #<Set> thrown when applying patches. #521

Closed
2 tasks done
nrdobie opened this issue Jan 30, 2020 · 2 comments
Closed
2 tasks done

Comments

@nrdobie
Copy link

nrdobie commented Jan 30, 2020

馃悰 Bug Report

I have a map that I am storing a set of ids in, with the key of the map being dynamic. If the set is already in the map when the id is added everything works as expected but if I try to create the set and add it to the map it fails when trying to use the produced patches. There is no issue with the produced value.

Link to repro

https://runkit.com/nrdobie/5e324930fc15ed001a135d23

To Reproduce

Add a new Set to a Map using produceWithPatches and then try to patch with applyPatches

Observed behavior

Throw Method Set.prototype.forEach called on incompatible receiver #<Set> TypeError

Expected behavior

Should update the Map with the new Set

Environment

We only accept bug reports against the latest Immer version.

  • Immer version: 5.3.2
  • Occurs with setUseProxies(true)
  • Occurs with setUseProxies(false) (ES5 only)
@mweststrate
Copy link
Collaborator

Currently release a fix in 5.3.3. Thanks for the reproduction!

@aleclarson
Copy link
Member

馃帀 This issue has been resolved in version 5.3.3 馃帀

The release is available on:

Your semantic-release bot 馃摝馃殌

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants