Skip to content
Snippets Groups Projects
Commit 66644612 authored by Gabriel Engel's avatar Gabriel Engel Committed by GitHub
Browse files

Merge pull request #4122 from KirbySSmith/#4121-ModelsBase.update-throws-error

#4121 models base.update throws error
parents bd15be00 720c9430
No related branches found
Tags 0.8.0
No related merge requests found
......@@ -74,10 +74,10 @@ class ModelsBase extends EventEmitter {
}
}
query = { _id: { $in: _.pluck(ids, '_id') } };
const result = this.model.update(query, update, options);
this.emit('update', query, update);
this.emit('change', 'update', query, update);
const idQuery = { _id: { $in: _.pluck(ids, '_id') } };
this.emit('update', idQuery, update);
this.emit('change', 'update', idQuery, update);
return result;
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment