Skip to content

Commit da92872

Browse files
committed
Minor improvement to trusted-replace-argument scriptlet
Ensure the `condition` value is stringified before testing it as a pattern.
1 parent 2695b9f commit da92872

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/js/resources/replace-argument.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ export function trustedReplaceArgument(
8282
replacer = ( ) => value;
8383
}
8484
const reCondition = extraArgs.condition
85-
? safe.patternToRegex(extraArgs.condition)
85+
? safe.patternToRegex(`${extraArgs.condition}`)
8686
: /^/;
8787
const getArg = context => {
8888
if ( argposRaw === 'this' ) { return context.thisArg; }

0 commit comments

Comments
 (0)