mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-02-03 00:27:50 +00:00
Avoid returning assignDefaults if no object is provided to _.defaults.
This commit is contained in:
@@ -2983,6 +2983,10 @@
|
||||
_.forEach(['assign', 'defaults', 'merge'], function(methodName) {
|
||||
var func = _[methodName];
|
||||
|
||||
test('`_.' + methodName + '` should return `undefined` when no destination object is provided', 1, function() {
|
||||
strictEqual(func(), undefined);
|
||||
});
|
||||
|
||||
test('`_.' + methodName + '` should return the existing wrapper when chaining', 1, function() {
|
||||
if (!isNpm) {
|
||||
var wrapper = _({ 'a': 1 });
|
||||
|
||||
Reference in New Issue
Block a user