'admin-22.06.07:函数deepClone对null的判断错误'
This commit is contained in:
parent
3a57a7f4ff
commit
4259e9931f
@ -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];
|
||||
|
Loading…
Reference in New Issue
Block a user