diff --git a/packages/richtext-lexical/src/field/lexical/utils/cloneDeep.ts b/packages/richtext-lexical/src/field/lexical/utils/cloneDeep.ts index 601025c30..27fd76752 100644 --- a/packages/richtext-lexical/src/field/lexical/utils/cloneDeep.ts +++ b/packages/richtext-lexical/src/field/lexical/utils/cloneDeep.ts @@ -37,6 +37,10 @@ export function cloneDeep(object: T, cache: WeakMap = new WeakMap() // Handle Array and Object if (typeof object === 'object' && object !== null) { + if ('$$typeof' in object && typeof object.$$typeof === 'symbol') { + return object + } + const clonedObject: any = Array.isArray(object) ? [] : Object.create(Object.getPrototypeOf(object))