mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-02-08 02:17:48 +00:00
Ensure _.merge assigns typed arrays directly. [closes #1453]
This commit is contained in:
@@ -2584,7 +2584,7 @@
|
||||
if (isArray(srcValue) || isTypedArray(srcValue)) {
|
||||
newValue = isArray(oldValue)
|
||||
? oldValue
|
||||
: ((isObject(oldValue) && isArrayLike(oldValue)) ? copyArray(oldValue) : []);
|
||||
: ((isObject(oldValue) && isArrayLike(oldValue)) ? copyArray(oldValue) : srcValue);
|
||||
}
|
||||
else if (isPlainObject(srcValue) || isArguments(srcValue)) {
|
||||
newValue = isArguments(oldValue)
|
||||
|
||||
Reference in New Issue
Block a user