Skip to content
Myr

fix: #482 object spread breaks IE

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

authored by Michel Weststrate · committed by Michel Weststrate · parent 5b8fe70 · Browse files · 1 file+2 added−3 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+2 added−3 removed

  • other:+2 added−3 removed

1 file+2 added−3 removed

modified:src/proxy.js+2 added-3 removed
358 unmodified lines
359 }, {})360}361362function makeTrapsForGetters(getters) {363 return {364 ...reflectTraps,363 return assign({}, reflectTraps, {364 get(state, prop, receiver) {365 return getters.hasOwnProperty(prop)366 ? getters[prop](state, prop, receiver)367 : Reflect.get(state, prop, receiver)368 },369 setPrototypeOf(state) {370 throw new Error("Object.setPrototypeOf() cannot be used on an Immer draft") // prettier-ignore371 }373 }372 })373}