diff --git a/packages/mongo-livedata/collection.js b/packages/mongo-livedata/collection.js index 073e689ab6..a719675820 100644 --- a/packages/mongo-livedata/collection.js +++ b/packages/mongo-livedata/collection.js @@ -179,6 +179,8 @@ Meteor.Collection._rewriteSelector = function (selector) { var ret = {}; _.each(selector, function (value, key) { if (value instanceof RegExp) { + // XXX should also do this translation at lower levels (eg if the outer + // level is $and/$or/$nor, or if there's an $elemMatch) ret[key] = {$regex: value.source}; var regexOptions = ''; // JS RegExp objects support 'i', 'm', and 'g'. Mongo regex $options