Skip to content

Commit fec12d0

Browse files
committed
fix usage of regex without flags
1 parent 163413f commit fec12d0

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

index.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,9 @@ module.exports = function(source) {
1818
if (typeof query.search !== 'undefined' && typeof query.replace !== 'undefined') {
1919
if (typeof query.flags !== 'undefined') {
2020
query.search = new RegExp(query.search, query.flags);
21-
22-
return source.replace(query.search, query.replace);
2321
}
22+
23+
return source.replace(query.search, query.replace);
2424
}
2525

2626
return source;

0 commit comments

Comments
 (0)