Skip to content

Commit

Permalink
protect against undefined constructor
Browse files Browse the repository at this point in the history
  • Loading branch information
BrianHung authored Aug 18, 2022
1 parent e28b53f commit 295c759
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/utils/common.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ export function isDraftable(value: any): boolean {
isPlainObject(value) ||
Array.isArray(value) ||
!!value[DRAFTABLE] ||
!!value.constructor[DRAFTABLE] ||
!!value.constructor?.[DRAFTABLE] ||
isMap(value) ||
isSet(value)
)
Expand Down

0 comments on commit 295c759

Please sign in to comment.