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