Skip to content

Commit 88b7952

Browse files
fix(proxy-state-tree): ensure object is extensible to identify as class
1 parent e5539f4 commit 88b7952

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ const arrayMutations = new Set([
2121
const getValue = (proxyOrValue) =>
2222
proxyOrValue && proxyOrValue[IS_PROXY] ? proxyOrValue[VALUE] : proxyOrValue
2323

24-
const isClass = (value) => typeof value === 'object' && value !== null && !Array.isArray(value) && value.constructor.name !== 'Object'
24+
const isClass = (value) => typeof value === 'object' && value !== null && !Array.isArray(value) && value.constructor.name !== 'Object' && Object.isExtensible(value)
2525

2626
const getArrayMutationRevert = (method: string, target: any[], args: any[]) => {
2727
switch (method) {

0 commit comments

Comments
 (0)