mirror of
https://github.com/meteor/meteor.git
synced 2026-05-02 03:01:46 -04:00
mongo: simplify matcher error handling in MongoConnection
This commit is contained in:
@@ -804,7 +804,7 @@ Object.assign(MongoConnection.prototype, {
|
||||
cursorDescription, ordered, callbacks, nonMutatingCallbacks) {
|
||||
var self = this;
|
||||
const collectionName = cursorDescription.collectionName;
|
||||
|
||||
|
||||
if (cursorDescription.options.tailable) {
|
||||
return self._observeChangesTailable(cursorDescription, ordered, callbacks);
|
||||
}
|
||||
@@ -880,14 +880,8 @@ Object.assign(MongoConnection.prototype, {
|
||||
function () {
|
||||
// We need to be able to compile the selector. Fall back to polling for
|
||||
// some newfangled $selector that minimongo doesn't support yet.
|
||||
try {
|
||||
matcher = new Minimongo.Matcher(cursorDescription.selector);
|
||||
return true;
|
||||
} catch (e) {
|
||||
// XXX make all compilation errors MinimongoError or something
|
||||
// so that this doesn't ignore unrelated exceptions
|
||||
return false;
|
||||
}
|
||||
matcher = new Minimongo.Matcher(cursorDescription.selector);
|
||||
return !!matcher;
|
||||
},
|
||||
function () {
|
||||
// ... and the selector itself needs to support oplog.
|
||||
|
||||
Reference in New Issue
Block a user