fix: undefined assigned to a prototype-inherited key gets dropped (#1262)
Before adoption: this commit came in with the history the project adopted, so no landing records it.
If an object's prototype has a key set to undefined and you assign undefined to that same key on a draft, immer treats it as a no-op since `prop in state.copy_` walks the prototype chain and finds it "already there." No own property gets created, no patch gets recorded. Swapped that for the has() own-property check that's already used a few lines up for the same purpose, and added a regressions test.
This commit
State
Before adoption: this commit came in with the history the project adopted, so no landing records it.
Diff stats
2 files+24 added−2 removed
- tests:+23 added−1 removed
- other:+1 added−1 removed