Skip to content

Commit

Permalink
Fix search selector
Browse files Browse the repository at this point in the history
  • Loading branch information
aldeed committed Aug 31, 2015
1 parent 36627c9 commit 16cc4c8
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion client/pubSelector.js
Original file line number Diff line number Diff line change
Expand Up @@ -55,5 +55,12 @@ getPubSelector = function getPubSelector(selector, searchString, searchFields, s
}
});

return {$and: [selector, {$or: searches}]};
var result;
if (selector) {
result = {$and: [selector, {$or: searches}]};
} else {
result = {$or: searches};
}

return result;
};

0 comments on commit 16cc4c8

Please sign in to comment.