mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-02-09 10:27:49 +00:00
Ensure _.merge deep clones array/typed-array/plain-object sources. [closes #1987]
This commit is contained in:
@@ -3081,7 +3081,7 @@
|
||||
}
|
||||
else {
|
||||
isCommon = false;
|
||||
newValue = baseClone(srcValue);
|
||||
newValue = baseClone(srcValue, true);
|
||||
}
|
||||
}
|
||||
else if (isPlainObject(srcValue) || isArguments(srcValue)) {
|
||||
@@ -3090,10 +3090,10 @@
|
||||
}
|
||||
else if (!isObject(objValue) || (srcIndex && isFunction(objValue))) {
|
||||
isCommon = false;
|
||||
newValue = baseClone(srcValue);
|
||||
newValue = baseClone(srcValue, true);
|
||||
}
|
||||
else {
|
||||
newValue = srcIndex ? baseClone(objValue) : objValue;
|
||||
newValue = objValue;
|
||||
}
|
||||
}
|
||||
else {
|
||||
|
||||
Reference in New Issue
Block a user