Skip to content
Myr

Proxy: Ignore setting a reference to itself. Fixes immerjs/immer#648

Before adoption: this commit came in with the history the project adopted, so no landing records it.

authored by Stefan · committed by Stefan · parent 9007be0 · Browse files · 1 file+3 added−0 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

1 file+3 added−0 removed

  • other:+3 added−0 removed

1 file+3 added−0 removed

modified:src/core/proxy.ts+3 added
155 unmodified lines
156 return true157 prepareCopy(state)158 markChanged(state)159 }160161 if (state.copy_![prop] === value && typeof value !== "number") return true162163 // @ts-ignore164 state.copy_![prop] = value165 state.assigned_[prop] = true166 return true
107 unmodified lines