commit 1f0b9aabd441e902812d1c78c5dc70c44df02c1f
parent 9ecd0dafce3b28cab58d5950e6993061ae05032d
Author: Agastya Chandrakant <me@hanabi.in>
Date: Mon, 1 Feb 2021 00:04:17 +0530
bug fix: avoid crashing whe article not-ready'd
Diffstat:
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/utils.js b/utils.js
@@ -100,7 +100,7 @@ function streamMessage(event) {
}
case "Disputed": {
const failedArticleRegex = /^\[\[:Talk:([^\]\]]*)\]\]/;
- const maybeMatch = comment.match(failedArticleRegex);
+ const maybeMatch = comment.match(failedArticleRegex) || [];
const failedArticle = maybeMatch[1];
if (comment.includes("added") && failedArticle) msg = `${user} has not-ready'd the [[${failedArticle}]] article.`;
break;