skip undefined emotes

This commit is contained in:
Jörn-Michael Miehe 2023-12-28 16:31:04 +00:00
parent 5824f03253
commit 9eb0976b35

View file

@ -57,6 +57,7 @@ async function process_text(text: string): Promise<string> {
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) +