Skip to content

Commit

Permalink
fix: don’t merge classes
Browse files Browse the repository at this point in the history
  • Loading branch information
hanspagel committed Jan 20, 2021
1 parent 787982f commit dba0c1a
Showing 1 changed file with 17 additions and 1 deletion.
18 changes: 17 additions & 1 deletion packages/core/src/utilities/isObject.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,19 @@
export default function isObject(item: any): boolean {
return (item && typeof item === 'object' && !Array.isArray(item))
if (!item) {
return false
}

if (typeof item !== 'object') {
return false
}

if (Array.isArray(item)) {
return false
}

if (item.constructor?.toString().substring(0, 5) === 'class') {
return false
}

return true
}

0 comments on commit dba0c1a

Please sign in to comment.