Fix logic for missing geo index error message check (#1824)
This commit is contained in:
@@ -17,7 +17,7 @@ export default class MongoCollection {
|
|||||||
return this._rawFind(query, { skip, limit, sort })
|
return this._rawFind(query, { skip, limit, sort })
|
||||||
.catch(error => {
|
.catch(error => {
|
||||||
// Check for "no geoindex" error
|
// Check for "no geoindex" error
|
||||||
if (error.code != 17007 || !error.message.match(/unable to find index for .geoNear/)) {
|
if (error.code != 17007 && !error.message.match(/unable to find index for .geoNear/)) {
|
||||||
throw error;
|
throw error;
|
||||||
}
|
}
|
||||||
// Figure out what key needs an index
|
// Figure out what key needs an index
|
||||||
|
|||||||
Reference in New Issue
Block a user