Ensure _.merge doesn't convert strings to arrays. [closes #1375]

This commit is contained in:
John-David Dalton
2015-07-30 08:10:22 -07:00
parent 693704a832
commit 3935d5f2f7
2 changed files with 9 additions and 2 deletions

View File

@@ -2327,7 +2327,7 @@
if (isArray(srcValue) || isTypedArray(srcValue)) {
newValue = isArray(oldValue)
? oldValue
: (isArrayLike(oldValue) ? copyArray(oldValue) : []);
: ((isObjectLike(oldValue) && isArrayLike(oldValue)) ? copyArray(oldValue) : []);
}
else if (isPlainObject(srcValue) || isArguments(srcValue)) {
newValue = isArguments(oldValue)