mirror of
https://github.com/meteor/meteor.git
synced 2026-05-02 03:01:46 -04:00
Move LOGICAL_OPERATORS back to file scope
This commit is contained in:
@@ -95,7 +95,7 @@ var compileValueSelector = function (valueSelector, selector, cursor) {
|
||||
};
|
||||
|
||||
// XXX can factor out common logic below
|
||||
LOGICAL_OPERATORS = {
|
||||
var LOGICAL_OPERATORS = {
|
||||
"$and": function(subSelector, operators, cursor) {
|
||||
if (!isArray(subSelector) || _.isEmpty(subSelector))
|
||||
throw Error("$and/$or/$nor must be nonempty array");
|
||||
|
||||
@@ -107,7 +107,7 @@ var getPaths = MinimongoTest.getSelectorPaths = function (sel) {
|
||||
if (k === "$where")
|
||||
return ''; // matches everything
|
||||
// we branch from $or/$and/$nor operator
|
||||
if (_.has(LOGICAL_OPERATORS, k))
|
||||
if (_.contains(['$or', '$and', '$nor'], k))
|
||||
return _.map(v, getPaths);
|
||||
// the value is a literal or some comparison operator
|
||||
return k;
|
||||
|
||||
Reference in New Issue
Block a user