Skip to content

Commit 99db255

Browse files
authored
Merge pull request thomas4019#5 from jeniawhite/evgb-RegexFix
$regex op value handling
2 parents b8f857c + 27409e3 commit 99db255

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

index.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,7 @@ function convertOp(path, op, value, parent, arrayPaths) {
120120
if (!parent['$options'] || !parent['$options'].includes('s')) {
121121
op2 += '(?p)'
122122
}
123-
return util.pathToText(path, true) + ' ' + op + ' \'' + op2 + util.stringEscape(value) + '\''
123+
return util.pathToText(path, true) + ' ' + op + ' \'' + op2 + util.stringEscape(value.source) + '\''
124124
case '$eq':
125125
case '$gt':
126126
case '$gte':

0 commit comments

Comments
 (0)