mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-02-03 08:37:49 +00:00
Bump to v3.7.0.
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
import arrayCopy from './arrayCopy';
|
||||
import getLength from './getLength';
|
||||
import isArguments from '../lang/isArguments';
|
||||
import isArray from '../lang/isArray';
|
||||
import isLength from './isLength';
|
||||
@@ -33,14 +34,14 @@ function baseMergeDeep(object, source, key, mergeFunc, customizer, stackA, stack
|
||||
}
|
||||
var value = object[key],
|
||||
result = customizer ? customizer(value, srcValue, key, object, source) : undefined,
|
||||
isCommon = typeof result == 'undefined';
|
||||
isCommon = result === undefined;
|
||||
|
||||
if (isCommon) {
|
||||
result = srcValue;
|
||||
if (isLength(srcValue.length) && (isArray(srcValue) || isTypedArray(srcValue))) {
|
||||
result = isArray(value)
|
||||
? value
|
||||
: ((value && value.length) ? arrayCopy(value) : []);
|
||||
: (getLength(value) ? arrayCopy(value) : []);
|
||||
}
|
||||
else if (isPlainObject(srcValue) || isArguments(srcValue)) {
|
||||
result = isArguments(value)
|
||||
|
||||
Reference in New Issue
Block a user