Skip to content

Commit d7d4699

Browse files
committed
Fix logic for missing geo index error message check (#1824)
1 parent 8c09c3d commit d7d4699

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Adapters/Storage/Mongo/MongoCollection.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ export default class MongoCollection {
1717
return this._rawFind(query, { skip, limit, sort })
1818
.catch(error => {
1919
// Check for "no geoindex" error
20-
if (error.code != 17007 || !error.message.match(/unable to find index for .geoNear/)) {
20+
if (error.code != 17007 && !error.message.match(/unable to find index for .geoNear/)) {
2121
throw error;
2222
}
2323
// Figure out what key needs an index

0 commit comments

Comments
 (0)