Skip to content

Commit

Permalink
fix toRegExp => toRegExp()
Browse files Browse the repository at this point in the history
  • Loading branch information
stanislav-atr committed Nov 1, 2022
1 parent e50b102 commit 1227b94
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/scriptlets/trusted-replace-fetch-response.js
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ export function trustedReplaceFetchResponse(source, pattern = '', replacement =
} = response;

const patternRegexp = pattern === getWildcardSymbol()
? toRegExp
? toRegExp()
: toRegExp(pattern);

const modifiedContent = text.replace(patternRegexp, replacement);
Expand Down
2 changes: 1 addition & 1 deletion src/scriptlets/trusted-replace-xhr-response.js
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@ export function trustedReplaceXhrResponse(source, pattern = '', replacement = ''
}

const patternRegexp = pattern === getWildcardSymbol()
? toRegExp
? toRegExp()
: toRegExp(pattern);

const modifiedContent = content.replace(patternRegexp, replacement);
Expand Down

0 comments on commit 1227b94

Please sign in to comment.