Skip to content

Commit

Permalink
fix(miniscore): _.defaults behavior for null (#41)
Browse files Browse the repository at this point in the history
Adjust the _.defaults behavior to match that of underscore and lodash to
no longer treat `null` and `undefined` the same and only consider
`undefined` for override.
  • Loading branch information
passy committed Apr 20, 2015
1 parent c39636c commit 45c7dd0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/hyperagent/miniscore.js
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ _.defaults = function (obj) {
_.each(Array.prototype.slice.call(arguments, 1), function (source) {
if (source) {
for (var prop in source) {
if (obj[prop] === null || obj[prop] === undefined) {
if (obj[prop] === undefined) {
obj[prop] = source[prop];
}
}
Expand Down

0 comments on commit 45c7dd0

Please sign in to comment.