Skip to content
Myr

nit: argument names

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

authored by Alec Larson · committed by Alec Larson · parent 53d0cdf · Browse files · 1 file+6 added−6 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+6 added−6 removed

  • other:+6 added−6 removed

1 file+6 added−6 removed

modified:src/proxy.js+6 added-6 removed
90 unmodified lines
91 }9293 return (drafts[prop] = createProxy(value, state))94 },95 has(target, prop) {96 return prop in source(target)95 has(state, prop) {96 return prop in source(state)97 },98 ownKeys(target) {99 return Reflect.ownKeys(source(target))98 ownKeys(state) {99 return Reflect.ownKeys(source(state))100 },101 set(state, prop, value) {102 if (!state.modified) {103 const baseValue = peek(state.base, prop)
32 unmodified lines
136 },137 defineProperty() {138 throw new Error("Object.defineProperty() cannot be used on an Immer draft") // prettier-ignore139 },140 getPrototypeOf(target) {141 return Object.getPrototypeOf(target.base)140 getPrototypeOf(state) {141 return Object.getPrototypeOf(state.base)142 },143 setPrototypeOf() {144 throw new Error("Object.setPrototypeOf() cannot be used on an Immer draft") // prettier-ignore145 }
154 unmodified lines