Skip to content

Commit

Permalink
fix: #482 object spread breaks IE
Browse files Browse the repository at this point in the history
  • Loading branch information
mweststrate committed Dec 18, 2019
1 parent 5b8fe70 commit 8bc21c8
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/proxy.js
Expand Up @@ -360,8 +360,7 @@ function makeReflectTraps(names) {
}

function makeTrapsForGetters(getters) {
return {
...reflectTraps,
return assign({}, reflectTraps, {
get(state, prop, receiver) {
return getters.hasOwnProperty(prop)
? getters[prop](state, prop, receiver)
Expand All @@ -370,5 +369,5 @@ function makeTrapsForGetters(getters) {
setPrototypeOf(state) {
throw new Error("Object.setPrototypeOf() cannot be used on an Immer draft") // prettier-ignore
}
}
})
}

0 comments on commit 8bc21c8

Please sign in to comment.