Skip to content

Commit

Permalink
fix: Object.getPrototypeOf with a draft
Browse files Browse the repository at this point in the history
  • Loading branch information
aleclarson committed Jan 21, 2019
1 parent 4f59b12 commit d5d07e8
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/proxy.js
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,9 @@ const objectTraps = {
deleteProperty,
getOwnPropertyDescriptor,
defineProperty,
getPrototypeOf(target) {
return Object.getPrototypeOf(target.base)
},
setPrototypeOf() {
throw new Error("Immer does not support `setPrototypeOf()`.")
}
Expand Down

0 comments on commit d5d07e8

Please sign in to comment.