Skip to content

Commit

Permalink
move regex parse into try
Browse files Browse the repository at this point in the history
  • Loading branch information
KentoNishi committed Jun 7, 2024
1 parent 5412b97 commit 08d276c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/ts/ytcf-logic.ts
Original file line number Diff line number Diff line change
Expand Up @@ -111,8 +111,8 @@ export function shouldActivatePreset(preset: YtcF.FilterPreset, info: SimpleVide
const result = s1[trigger.type](s2);
if (result) return true;
} else {
const regex = parseRegex(trigger.value);
try {
const regex = parseRegex(trigger.value);
const result = regex.test(compStr);
if (result) return true;
} catch (e) {
Expand Down

0 comments on commit 08d276c

Please sign in to comment.