馃悰 Bug Report
const {produce} = require("immer");
const bar = {};
const foo = {bar};
console.log(
produce(foo, (draft) => {
// comment next line out and it works as expected
draft.bar;
draft.bar = bar;
}) === foo
);
Accessing draft.bar and then setting draft.bar to the same value breaks immutability. This appears to be a regression starting from version 7.0.0 onwards. Works as expected in 6.
Link to repro
https://codesandbox.io/s/immer-sandbox-forked-ldhg9?file=/src/index.ts
Environment
We only accept bug reports against the latest Immer version.
- Immer version: 7.0.0 onwards
馃悰 Bug Report
Accessing draft.bar and then setting draft.bar to the same value breaks immutability. This appears to be a regression starting from version 7.0.0 onwards. Works as expected in 6.
Link to repro
https://codesandbox.io/s/immer-sandbox-forked-ldhg9?file=/src/index.ts
Environment
We only accept bug reports against the latest Immer version.