mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-02-04 17:07:49 +00:00
Bump to v3.7.0.
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
var arrayCopy = require('./arrayCopy'),
|
||||
getLength = require('./getLength'),
|
||||
isArguments = require('../lang/isArguments'),
|
||||
isArray = require('../lang/isArray'),
|
||||
isLength = require('./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