mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-02-01 23:57:49 +00:00
Adjust handling of typed arrays and arguments objects in baseMergeDeep.
This commit is contained in:
committed by
jdalton
parent
cccd43a16b
commit
6683809447
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user