Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

doc should override conditions

  • Loading branch information...
commit 6b8c8478a51362691ac259c1eb1550b76ed02973 1 parent 661afe0
@joscha joscha authored
Showing with 3 additions and 3 deletions.
  1. +3 −3 index.js
View
6 index.js
@@ -31,10 +31,10 @@ function findOrCreatePlugin(schema, options) {
callback(err, result, false)
}
} else {
- for (var key in conditions) {
- doc[key] = conditions[key];
+ for (var key in doc) {
+ conditions[key] = doc[key];
}
- var obj = new self(doc)
+ var obj = new self(conditions)
obj.save(function(err) {
callback(err, obj, true);
});
Please sign in to comment.
Something went wrong with that request. Please try again.