fix: do not record a deletion when a base value is written back (#1295)
Before adoption: this commit came in with the history the project adopted, so no landing records it.
The set trap has a fast path for assigning a property its own base value back after Immer drafted it. That path recorded the property in `assigned_` as `false`, which patch generation reads as a deletion, so a producer that writes a base value back and then changes anything else on the same object emits a spurious "remove" patch. Replaying the patches then drops a property that is still present in the produced result. The property still holds its base value at that point, so nothing was assigned and nothing was deleted. Remove the entry instead.
This commit
State
Before adoption: this commit came in with the history the project adopted, so no landing records it.
Diff stats
2 files+35 added−1 removed
- tests:+32 added−0 removed
- other:+3 added−1 removed