Permalink
Browse files

fixed; adding mulitple props to previously null object

  • Loading branch information...
1 parent ee5950b commit 8153e563ab28b0b89cc73d188c99129092d75eed @aheckmann aheckmann committed Mar 31, 2011
Showing with 5 additions and 0 deletions.
  1. +5 −0 lib/mongoose/document.js
View
@@ -229,6 +229,11 @@ Document.prototype.set = function (path, val) {
var markedModified;
if (parts.length > 1) {
for (var i = 0, len = parts.length - 1; i <= len; ++i) {
+ if (this.isModified(parts[i])) {
+ markedModified = true;
+ break;
+ }
+
if (null === this.get(parts[i])) {
this.activePaths.modify(parts[i]);
markedModified = true;

0 comments on commit 8153e56

Please sign in to comment.