Skip to content

Commit

Permalink
fix: Don't use proxies if Proxy.revocable is not defined. Fixes #435
Browse files Browse the repository at this point in the history
Use legacy proxies if Proxy.revocable is not defined. Fixes #435
  • Loading branch information
mweststrate committed Oct 4, 2019
2 parents f37b6be + e19d129 commit c84aa53
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/immer.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,10 @@ import {ImmerScope} from "./scope"
function verifyMinified() {}

const configDefaults = {
useProxies: typeof Proxy !== "undefined" && typeof Reflect !== "undefined",
useProxies:
typeof Proxy !== "undefined" &&
typeof Proxy.revocable !== "undefined" &&
typeof Reflect !== "undefined",
autoFreeze:
typeof process !== "undefined"
? process.env.NODE_ENV !== "production"
Expand Down

0 comments on commit c84aa53

Please sign in to comment.