mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-02-01 07:47:49 +00:00
Guard against nullish value being passed to arrayCopy in baseMergeDeep.
This commit is contained in:
committed by
jdalton
parent
439ffa5849
commit
cd69a53406
@@ -2522,8 +2522,11 @@
|
||||
if (isCommon) {
|
||||
result = srcValue;
|
||||
if (isLength(srcValue.length) && (isArray(srcValue) || isTypedArray(srcValue))) {
|
||||
result = isArray(value) ? value : arrayCopy(value);
|
||||
} else if (isPlainObject(srcValue) || isArguments(srcValue)) {
|
||||
result = isArray(value)
|
||||
? value
|
||||
: (value ? arrayCopy(value) : []);
|
||||
}
|
||||
else if (isPlainObject(srcValue) || isArguments(srcValue)) {
|
||||
result = isArguments(value)
|
||||
? arrayToObject(value)
|
||||
: (isPlainObject(value) ? value : {});
|
||||
|
||||
Reference in New Issue
Block a user