Make _.merge assign null values. [closes #151]

Former-commit-id: 5a839996db9475182d5957d2f8cb4b3c265b0d9f
This commit is contained in:
John-David Dalton
2013-01-05 00:12:33 -08:00
parent 2b23020695
commit e2c2a37221
7 changed files with 24 additions and 14 deletions

View File

@@ -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,