mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-02-02 08:07:50 +00:00
Ensute _.assignWith respects customizer results of undefined. [closes #2424]
This commit is contained in:
@@ -4446,9 +4446,9 @@
|
||||
|
||||
var newValue = customizer
|
||||
? customizer(object[key], source[key], key, object, source)
|
||||
: source[key];
|
||||
: undefined;
|
||||
|
||||
assignValue(object, key, newValue);
|
||||
assignValue(object, key, newValue === undefined ? source[key] : newValue);
|
||||
}
|
||||
return object;
|
||||
}
|
||||
|
||||
@@ -1454,7 +1454,7 @@
|
||||
QUnit.test('`_.' + methodName + '` should work with a `customizer` that returns `undefined`', function(assert) {
|
||||
assert.expect(1);
|
||||
|
||||
var expected = { 'a': undefined };
|
||||
var expected = { 'a': 1 };
|
||||
assert.deepEqual(func({}, expected, noop), expected);
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user