diff --git a/packages/minimongo/minimongo_server_tests.js b/packages/minimongo/minimongo_server_tests.js index 89bd9bfbf3..38cc1476da 100644 --- a/packages/minimongo/minimongo_server_tests.js +++ b/packages/minimongo/minimongo_server_tests.js @@ -528,6 +528,7 @@ Tinytest.add("minimongo - sorter and projection combination", function (test) { // floating point math, the current implementation falls back to T T({ a: { $gt: 9.999999999999999, $lt: 10 }, x: 1 }, { $set: { x: 1 } }, "very close $gt and $lt"); T({ a: { $eq: 5 } }, { $set: { a: 5 } }, "set of $eq"); + T({ a: { $eq: 5 }, b: { $eq: 7 } }, { $set: { a: 5 } }, "set of $eq with other $eq"); F({ a: { $eq: 5 } }, { $set: { a: 4 } }, "set below of $eq"); F({ a: { $eq: 5 } }, { $set: { a: 6 } }, "set above of $eq"); T({ a: { $ne: 5 } }, { $unset: { a: 1 } }, "unset of $ne"); @@ -568,4 +569,3 @@ Tinytest.add("minimongo - sorter and projection combination", function (test) { T({ a: { $ne: { a: 2 } } }, { $set: { a: { a: 2 } } }, "$ne object"); }); })(); - diff --git a/packages/minimongo/selector_modifier.js b/packages/minimongo/selector_modifier.js index 6b097c6632..54b37df68b 100644 --- a/packages/minimongo/selector_modifier.js +++ b/packages/minimongo/selector_modifier.js @@ -142,8 +142,7 @@ Minimongo.Matcher.prototype.matchingDocument = function () { // chance we can use one of those as "matching" // dummy value if (valueSelector.$eq) { - var matcher = new Minimongo.Matcher({ placeholder: valueSelector }); - return matcher.documentMatches({ placeholder: valueSelector.$eq }); + return valueSelector.$eq; } else if (valueSelector.$in) { var matcher = new Minimongo.Matcher({ placeholder: valueSelector }); @@ -220,4 +219,3 @@ var startsWith = function(str, starts) { return str.length >= starts.length && str.substring(0, starts.length) === starts; }; -