Skip to content

Commit 4ed2fbe

Browse files
fix(proxy-state-tree): fix error where undefined is returned from function
1 parent a9e2144 commit 4ed2fbe

File tree

1 file changed

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

1 file changed

+1
-1
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,7 @@ function createObjectProxy(tree, value, path) {
130130
? tree.options.dynamicWrapper(tree, nestedPath, targetValue)
131131
: targetValue(tree, nestedPath)
132132

133-
if (dynamicValue[IS_PROXY]) {
133+
if (dynamicValue && dynamicValue[IS_PROXY]) {
134134
delete dynamicValue[VALUE][tree.PROXY]
135135
Object.defineProperty(dynamicValue[VALUE], tree.PROXY, {
136136
configurable: true,

0 commit comments

Comments
 (0)