Skip to content

Commit

Permalink
fixed; non-mixed type object setters work after initd from null
Browse files Browse the repository at this point in the history
  • Loading branch information
aheckmann committed Mar 30, 2011
1 parent ed13f49 commit c59251b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/mongoose/document.js
Expand Up @@ -223,7 +223,7 @@ Document.prototype.set = function (path, val) {
if (i + 1 == l)
obj[parts[i]] = val;
else {
obj = obj[parts[i]];
obj = obj[parts[i]] || (obj[parts[i]] = {});
}
}
}
Expand Down

0 comments on commit c59251b

Please sign in to comment.