Adjust handling of typed arrays and arguments objects in baseMergeDeep.

This commit is contained in:
John-David Dalton
2015-01-16 02:08:01 -08:00
committed by jdalton
parent cccd43a16b
commit 6683809447

View File

@@ -2522,9 +2522,11 @@
if (isCommon) {
result = srcValue;
if (isLength(srcValue.length) && (isArray(srcValue) || isTypedArray(srcValue))) {
result = isArray(value) ? value : [];
} else if (isPlainObject(srcValue)) {
result = isPlainObject(value) ? value : {};
result = isArray(value) ? value : arrayCopy(value);
} else if (isPlainObject(srcValue) || isArguments(srcValue)) {
result = isArguments(value)
? arrayToObject(value)
: (isPlainObject(value) ? value : {});
}
}
// Add the source value to the stack of traversed objects and associate