mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-02-09 18:37:50 +00:00
Remove customizer assignment from clone and cloneDeep.
This commit is contained in:
@@ -8557,8 +8557,9 @@
|
|||||||
customizer = isDeep;
|
customizer = isDeep;
|
||||||
isDeep = false;
|
isDeep = false;
|
||||||
}
|
}
|
||||||
customizer = typeof customizer == 'function' ? bindCallback(customizer, thisArg, 1) : undefined;
|
return typeof customizer == 'function'
|
||||||
return baseClone(value, isDeep, customizer);
|
? baseClone(value, isDeep, bindCallback(customizer, thisArg, 1))
|
||||||
|
: baseClone(value, isDeep);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -8607,8 +8608,9 @@
|
|||||||
* // => 20
|
* // => 20
|
||||||
*/
|
*/
|
||||||
function cloneDeep(value, customizer, thisArg) {
|
function cloneDeep(value, customizer, thisArg) {
|
||||||
customizer = typeof customizer == 'function' ? bindCallback(customizer, thisArg, 1) : undefined;
|
return typeof customizer == 'function'
|
||||||
return baseClone(value, true, customizer);
|
? baseClone(value, true, bindCallback(customizer, thisArg, 1))
|
||||||
|
: baseClone(value, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
Reference in New Issue
Block a user