Closed 18613109040 closed 1 year ago
An error was reported when a ref property was recovered using the proxyWithHistory component
Please include a minimal reproduction. For details, go to add -> undo -> redo
deepClone in proxyWithHistory wants keywords for ref not to be converted to a proxy structure
const deepClone = (obj: T): T => { if (!isObject(obj)) { return obj } const baseObject: T = Array.isArray(obj) ? [] : Object.create(Object.getPrototypeOf(obj)) Reflect.ownKeys(obj).forEach((key) => { if (key === 'ref') { baseObject[key as keyof T] = Reflect.get(obj, key); } else { baseObject[key as keyof T] = deepClone(obj[key as keyof T]); } }) return baseObject }
An error was reported when a ref property was recovered using the proxyWithHistory component
Please include a minimal reproduction. For details, go to add -> undo -> redo