fix: don’t merge classes

This commit is contained in:
Hans Pagel 2021-01-20 15:10:30 +01:00
parent 787982fea0
commit dba0c1ac15

View File

@ -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
}