diff --git a/lib/mongo/Mutator.js b/lib/mongo/Mutator.js index d6bb31d..b3f6e81 100644 --- a/lib/mongo/Mutator.js +++ b/lib/mongo/Mutator.js @@ -9,6 +9,7 @@ import { } from "./lib/dispatchers"; import Config from "../config"; import { Events } from "../constants"; +import { Mongo } from 'meteor/mongo'; function runCallbackInBackground(fn) { Meteor.defer(Meteor.bindEnvironment(fn)); @@ -107,7 +108,7 @@ export default class Mutator { * @returns {*} */ static async update(Originals, selector, modifier, _config, callback) { - if (_.isString(selector)) { + if (_.isString(selector) || selector instanceof Mongo.ObjectID) { selector = { _id: selector }; }