File tree Expand file tree Collapse file tree 1 file changed +3
-1
lines changed Expand file tree Collapse file tree 1 file changed +3
-1
lines changed Original file line number Diff line number Diff line change @@ -87,9 +87,11 @@ module.exports = function (config) {
8787 // https://github.com/screeps/backend-local/blob/7520c8c7e6a443ad955d25e064dbd151a909d8cb/lib/strongholds.js#L132
8888 //
8989 // ignore properly escaped sector regex queries
90- } else if ( v . match ( / \^ [ E W ] \d * \\ d [ N S ] \d * \\ d \$ / g) === null && v . match ( / \^ \[ [ E W ] { 2 } \] \\ d \* 5 \[ [ N S ] { 2 } \] \\ d \* 5 \$ / g) === null ) {
90+ } else if ( typeof v === 'string' && v . match ( / \^ [ E W ] \d * \\ d [ N S ] \d * \\ d \$ / g) === null && v . match ( / \^ \[ [ E W ] { 2 } \] \\ d \* 5 \[ [ N S ] { 2 } \] \\ d \* 5 \$ / g) === null ) {
9191 // default regex escape fix for loki regex queries to work with mongo regex queries
9292 query . $regex = v . replace ( / \\ { 1 , 2 } / g, '\\\\' )
93+ } else {
94+ query . $regex = v
9395 }
9496 }
9597 if ( typeof v === 'object' ) {
You can’t perform that action at this time.
0 commit comments