mirror of
https://github.com/ueberdosis/tiptap.git
synced 2025-01-18 06:03:22 +08:00
fix: don’t merge classes
This commit is contained in:
parent
787982fea0
commit
dba0c1ac15
@ -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
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user