Method Set.prototype.forEach called on incompatible receiver #<Set>
thrown when applying patches.
#521
Closed
2 tasks done
馃悰 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 withapplyPatches
Observed behavior
Throw
Method Set.prototype.forEach called on incompatible receiver #<Set>
TypeErrorExpected behavior
Should update the Map with the new Set
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: