Skip to content

Commit

Permalink
Fixed custom _id field name behaviour on insert
Browse files Browse the repository at this point in the history
  • Loading branch information
notheotherben committed Dec 13, 2013
1 parent 6b1b729 commit 36ad1cc
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/Instance.js
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,7 @@ function Instance(model, doc, isNew) {
});
};

if (oldDoc._id && !isNew) return runOptions();
if (!isNew) return runOptions();
else createObject(function (err) {
if (err) return cb(err);
if (Object.keys(changes).length > 0) runOptions(cb);
Expand Down

0 comments on commit 36ad1cc

Please sign in to comment.