Skip to content

Commit

Permalink
Fix notifications monitor no longer working when trying to match a ke…
Browse files Browse the repository at this point in the history
…yword
  • Loading branch information
FMaz008 committed Apr 18, 2024
1 parent 152cda3 commit 09630c7
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion page/notifications.js
Original file line number Diff line number Diff line change
Expand Up @@ -239,8 +239,9 @@ function setETV(asin, etv) {

function keywordMatch(keywords, title) {
return keywords.some((word) => {
let regex;
try {
const regex = new RegExp(`\\b${word}\\b`, "i");
regex = new RegExp(`\\b${word}\\b`, "i");
} catch (error) {
if (error instanceof SyntaxError) {
showRuntime("NOTIFICATION: The keyword '" + word + "' is not a valid regular expression, skipping it.");
Expand Down

0 comments on commit 09630c7

Please sign in to comment.