Skip to content

Commit 10d304b

Browse files
fix(proxy-state-tree): fix issue with accessing Object.prototype methods
1 parent ce04326 commit 10d304b

File tree

1 file changed

+2
-1
lines changed
  • packages/node_modules/proxy-state-tree/src

1 file changed

+2
-1
lines changed

packages/node_modules/proxy-state-tree/src/proxify.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,8 @@ function createObjectProxy(tree, value, path) {
9898
if (prop === PATH) return path
9999
if (prop === VALUE) return value
100100

101-
if (typeof prop === 'symbol') return target[prop]
101+
if (typeof prop === 'symbol' || prop in Object.prototype)
102+
return target[prop]
102103

103104
const targetValue = target[prop]
104105
const nestedPath = concat(path, prop)

0 commit comments

Comments
 (0)