Skip to content

Commit 0d9af84

Browse files
fix(proxy-state-tree): check for symbols on getter
1 parent c645f98 commit 0d9af84

File tree

1 file changed

+3
-0
lines changed
  • packages/node_modules/proxy-state-tree/src

1 file changed

+3
-0
lines changed

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

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,7 @@ function createArrayProxy(tree, value, path) {
7171
},
7272
set(target, prop, value) {
7373
const nestedPath = concat(path, prop)
74+
7475
if (tree.status !== STATUS.TRACKING_MUTATIONS) {
7576
throw new Error(
7677
`proxy-state-tree - You are mutating the path "${nestedPath}", but it is not allowed`
@@ -92,6 +93,8 @@ function createObjectProxy(tree, value, path) {
9293
get(target, prop) {
9394
if (prop === IS_PROXY) return true
9495

96+
if (typeof prop === 'symbol') return target[prop]
97+
9598
const value = target[prop]
9699
const nestedPath = concat(path, prop)
97100

0 commit comments

Comments
 (0)