From 110be607c5da59b14d285a8a8b597e202fa42473 Mon Sep 17 00:00:00 2001
From: Zetaphor <zetaphor@hey.com>
Date: Thu, 22 Jun 2023 15:51:25 -0300
Subject: [PATCH] Typescript linter fixes

---
 src/shared/markdown.ts | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/shared/markdown.ts b/src/shared/markdown.ts
index 062b150..ececf47 100644
--- a/src/shared/markdown.ts
+++ b/src/shared/markdown.ts
@@ -79,7 +79,7 @@ function localCommunityLinkParser(md: MarkdownIt) {
       if (state.tokens[i].type !== "inline") {
         continue;
       }
-      const inlineTokens = state.tokens[i].children;
+      const inlineTokens: Token[] = state.tokens[i].children || [];
       for (let j = inlineTokens.length - 1; j >= 0; j--) {
         if (
           inlineTokens[j].type === "text" &&
@@ -93,7 +93,7 @@ function localCommunityLinkParser(md: MarkdownIt) {
 
           let linkClass = "community-link";
 
-          for (const match: RegExpMatchArray of matches) {
+          for (const match of matches) {
             // If there is plain text before the match, add it as a separate token
             if (match.index !== undefined && match.index > lastIndex) {
               const textToken = new state.Token("text", "", 0);
-- 
2.44.1