Ensure _.merge deep clones array/typed-array/plain-object sources. [closes #1987]

This commit is contained in:
John-David Dalton
2016-02-11 22:56:33 -08:00
parent bd2428dde5
commit 53b3f81abe
2 changed files with 20 additions and 8 deletions

View File

@@ -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 {