mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-02-09 18:37:50 +00:00
Fix failing Backbone test and ensure _.assign works properly with a customizer that returns undefined.
This commit is contained in:
@@ -1694,11 +1694,12 @@
|
||||
if (customizer) {
|
||||
var value = object[key],
|
||||
result = customizer(value, source[key], key, object, source);
|
||||
|
||||
if (result !== value || (typeof value == 'undefined' && !(key in object))) {
|
||||
object[key] = result;
|
||||
}
|
||||
} else {
|
||||
result = source[key];
|
||||
}
|
||||
if (!(customizer && result === value)) {
|
||||
object[key] = result;
|
||||
object[key] = source[key];
|
||||
}
|
||||
}
|
||||
return object;
|
||||
|
||||
Reference in New Issue
Block a user