Skip to content
Browse files

Include both null and undefined for non-existent mixin props

  • Loading branch information...
1 parent 998c3b0 commit 4142778629c4ab10219d1bb53c214fd22e9dbbdc mde committed
Showing with 2 additions and 2 deletions.
  1. +2 −2 lib/core.js
View
4 lib/core.js
@@ -29,8 +29,8 @@ var core = new (function () {
(src[p] !== null) &&
!(src[p] instanceof Array)) {
// Create the source property if it doesn't exist
- // TODO: What if it's something weird like a String or Number?
- if (typeof targ[p] == 'undefined') {
+ // Double-equal to undefined includes both null and undefined
+ if (targ[p] == undefined) {
targ[p] = {};
}
_mix(targ[p], src[p], merge, includeProto); // Recurse

0 comments on commit 4142778

Please sign in to comment.
Something went wrong with that request. Please try again.