mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-02-10 02:47:50 +00:00
Avoid deep cloning source values if a customizer is provided.
This commit is contained in:
@@ -3184,7 +3184,7 @@
|
|||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
isCommon = false;
|
isCommon = false;
|
||||||
newValue = baseClone(srcValue, true);
|
newValue = baseClone(srcValue, !customizer);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if (isPlainObject(srcValue) || isArguments(srcValue)) {
|
else if (isPlainObject(srcValue) || isArguments(srcValue)) {
|
||||||
@@ -3193,7 +3193,7 @@
|
|||||||
}
|
}
|
||||||
else if (!isObject(objValue) || (srcIndex && isFunction(objValue))) {
|
else if (!isObject(objValue) || (srcIndex && isFunction(objValue))) {
|
||||||
isCommon = false;
|
isCommon = false;
|
||||||
newValue = baseClone(srcValue, true);
|
newValue = baseClone(srcValue, !customizer);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
newValue = objValue;
|
newValue = objValue;
|
||||||
|
|||||||
Reference in New Issue
Block a user