【代码修复】cloneDeep 深拷贝对列表的处理错误
parent
d716bc4619
commit
dfe19ca710
|
@ -45,7 +45,7 @@ export function last(data) {
|
|||
}
|
||||
|
||||
export function cloneDeep(obj) {
|
||||
const d = isArray(obj) ? obj : {};
|
||||
const d = isArray(obj) ? [...obj] : {};
|
||||
|
||||
if (isObject(obj)) {
|
||||
for (const key in obj) {
|
||||
|
|
Loading…
Reference in New Issue