Add a XXX caveat to #346 fix.

This commit is contained in:
David Glasser
2012-12-17 10:06:48 -08:00
parent 3d870954ca
commit f68a8a3431

View File

@@ -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