From 9eb0976b355a2b7a1558da57dd086dfc801cbf0d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rn-Michael=20Miehe?= Date: Thu, 28 Dec 2023 16:31:04 +0000 Subject: [PATCH] skip undefined emotes --- src/main.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/src/main.ts b/src/main.ts index 4545563..71e0111 100644 --- a/src/main.ts +++ b/src/main.ts @@ -57,6 +57,7 @@ async function process_text(text: string): Promise { for (const emote of matches.reverse()) { const [match, code] = emote; const index = emote.index ?? 0; + if (!(code in emotes)) continue; text = text.substring(0, index) +