diff --git a/src/utils/other.ts b/src/utils/other.ts index 8a3d66c..6bb4fbd 100644 --- a/src/utils/other.ts +++ b/src/utils/other.ts @@ -113,7 +113,7 @@ export function deepClone(obj: any) { newObj = {}; } for (let attr in obj) { - if (typeof obj[attr] === 'object') { + if (obj[attr] && typeof obj[attr] === 'object') { newObj[attr] = deepClone(obj[attr]); } else { newObj[attr] = obj[attr];