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
This seems to be a regression (used to work in version 6). A Symbol property in a Class cannot be changed twice (2 consecutive producers). I assume this has to do with object freezing being applied because the given error is Cannot assign to read only property 'Symbol(customSymbol)' of object.
Create Immerable Class and add some symbol as a property key.
Instantiate class and produce new instance by mutating symbol property value.
Repeat step 2 with another variable. Code should break in version 7 (but not in version 6).
Observed behavior
Inconsistent update behavior when producing twice. Maybe I'm missing some new API required to change the symbol? Though if that's the case (object freeze), I'd suggest rolling back to previous behavior if possible. New behavior could be a bit unpredictable.
Expected behavior
Both produce calls should work without errors thrown.
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:
🐛 Bug Report
This seems to be a regression (used to work in version 6). A Symbol property in a Class cannot be changed twice (2 consecutive producers). I assume this has to do with object freezing being applied because the given error is
Cannot assign to read only property 'Symbol(customSymbol)' of object
.Link to repro
https://codesandbox.io/s/immer-bug-018r6?file=/src/index.ts
To Reproduce
Steps to reproduce the behavior:
Observed behavior
Inconsistent update behavior when producing twice. Maybe I'm missing some new API required to change the symbol? Though if that's the case (object freeze), I'd suggest rolling back to previous behavior if possible. New behavior could be a bit unpredictable.
Expected behavior
Both produce calls should work without errors thrown.
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: