Skip to content

Commit

Permalink
Instance can be re-added by calling save() after remove()
Browse files Browse the repository at this point in the history
  • Loading branch information
notheotherben committed Jan 15, 2014
1 parent bb9a507 commit 033f10b
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions lib/Instance.js
Expand Up @@ -216,6 +216,7 @@ Instance.prototype.remove = Instance.prototype.delete = function(callback) {
this.__state.model.collection.remove(conditions, { w: callback ? 1 : 0 }, (function(err, removed) {
if(err) this.emit('error', err);
else this.emit('removed', this);
this.__state.isNew = true;
return callback(err, removed);
}).bind(this));
});
Expand Down

0 comments on commit 033f10b

Please sign in to comment.