Ensute _.assignWith respects customizer results of undefined. [closes #2424]

This commit is contained in:
John-David Dalton
2016-06-16 06:44:22 -07:00
parent b2b3391827
commit 9cabc7c222
2 changed files with 3 additions and 3 deletions

View File

@@ -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;
}

View File

@@ -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);
});
});