Skip to content

Commit

Permalink
Fixed typos.
Browse files Browse the repository at this point in the history
  • Loading branch information
radekmie committed Aug 9, 2017
1 parent 8b43925 commit bf97830
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 7 deletions.
14 changes: 7 additions & 7 deletions packages/minimongo/common.js
Original file line number Diff line number Diff line change
Expand Up @@ -538,13 +538,6 @@ export function compileDocumentSelector(docSelector, matcher, options = {}) {
const docMatchers = Object.keys(docSelector).map(key => {
const subSelector = docSelector[key];

// Don't add a matcher if subSelector is a function -- this is to match
// the behavior of Meteor on the server (inherited from the node mongodb
// driver), which is to ignore any part of a selector which is a function.
if (typeof subSelector === 'function') {
return undefined;
}

if (key.substr(0, 1) === '$') {
// Outer operators are either logical operators (they recurse back into
// this function), or $where.
Expand All @@ -563,6 +556,13 @@ export function compileDocumentSelector(docSelector, matcher, options = {}) {
matcher._recordPathUsed(key);
}

// Don't add a matcher if subSelector is a function -- this is to match
// the behavior of Meteor on the server (inherited from the node mongodb
// driver), which is to ignore any part of a selector which is a function.
if (typeof subSelector === 'function') {
return undefined;
}

const lookUpByIndex = makeLookupFunction(key);
const valueMatcher = compileValueSelector(
subSelector,
Expand Down
1 change: 1 addition & 0 deletions packages/minimongo/minimongo_server.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import './minimongo_common.js';
import {
hasOwn,
isNumericKey,
isOperatorObject,
pathsToTree,
Expand Down

0 comments on commit bf97830

Please sign in to comment.