mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-02-04 17:07:49 +00:00
Ensure _.merge correctly coerces objects to arrays. [closes #1061]
This commit is contained in:
@@ -2581,7 +2581,7 @@
|
||||
if (isLength(srcValue.length) && (isArray(srcValue) || isTypedArray(srcValue))) {
|
||||
result = isArray(value)
|
||||
? value
|
||||
: (value ? arrayCopy(value) : []);
|
||||
: ((value && value.length) ? arrayCopy(value) : []);
|
||||
}
|
||||
else if (isPlainObject(srcValue) || isArguments(srcValue)) {
|
||||
result = isArguments(value)
|
||||
|
||||
Reference in New Issue
Block a user