diff --git a/src/utils/other.ts b/src/utils/other.ts index 2edee2b..4d0c519 100644 --- a/src/utils/other.ts +++ b/src/utils/other.ts @@ -106,7 +106,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];