mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-02-04 00:57:48 +00:00
Ensure _.merge skips undefined values if a destination value exists.
This commit is contained in:
@@ -2534,7 +2534,7 @@
|
||||
if (isCommon) {
|
||||
result = srcValue;
|
||||
}
|
||||
if ((isSrcArr || result !== undefined) &&
|
||||
if ((result !== undefined || (isSrcArr && !(key in object))) &&
|
||||
(isCommon || (result === result ? (result !== value) : (value === value)))) {
|
||||
object[key] = result;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user