mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-02-08 18:17:48 +00:00
Make _.merge assign null values. [closes #151]
Former-commit-id: 5a839996db9475182d5957d2f8cb4b3c265b0d9f
This commit is contained in:
@@ -1726,7 +1726,7 @@
|
||||
|
||||
/**
|
||||
* Recursively merges own enumerable properties of the source object(s), that
|
||||
* don't resolve to `null`/`undefined`, into the `destination` object. Subsequent
|
||||
* don't resolve to `undefined`, into the `destination` object. Subsequent
|
||||
* sources will overwrite propery assignments of previous sources.
|
||||
*
|
||||
* @static
|
||||
@@ -1796,7 +1796,7 @@
|
||||
// recursively merge objects and arrays (susceptible to call stack limits)
|
||||
object[key] = merge(value, source, indicatorObject, stackA, stackB);
|
||||
}
|
||||
} else if (source != null) {
|
||||
} else if (typeof source != 'undefined') {
|
||||
object[key] = source;
|
||||
}
|
||||
});
|
||||
@@ -3682,7 +3682,7 @@
|
||||
* var initialize = _.once(createApplication);
|
||||
* initialize();
|
||||
* initialize();
|
||||
* // Application is only created once.
|
||||
* // `initialize` executes `createApplication` once
|
||||
*/
|
||||
function once(func) {
|
||||
var ran,
|
||||
|
||||
Reference in New Issue
Block a user