From: Anon Date: Sat, 25 Feb 2023 21:46:03 +0000 (-0600) Subject: Fix loading emojis X-Git-Url: http://these/git/%7B%60%24%7BwebArchiveUrl%7D/%22%7B%7D/%22https:/nerdica.net/%7B?a=commitdiff_plain;h=d7f4d2ccc120c2ab47171aef8acdd25f3c68a2a8;p=lemmy-ui.git Fix loading emojis --- diff --git a/src/shared/utils.ts b/src/shared/utils.ts index 0200924..9ca1b6d 100644 --- a/src/shared/utils.ts +++ b/src/shared/utils.ts @@ -630,7 +630,7 @@ export function setupTribute() { values: Object.entries(emojiShortName).map(e => { return { key: e[1], val: e[0] }; }).concat( - Object.entries(customEmojisLookup).map((k) => ({ + Array.from(customEmojisLookup.entries()).map((k) => ({ key: k[0], val: `${k[1].custom_emoji.alt_text}` })) @@ -749,7 +749,7 @@ function setupMarkdown() { typographer: true, }; - const emojiDefs = Object.fromEntries(Object.entries(customEmojisLookup).map((k) => [k[0], k[0]])); + const emojiDefs = Array.from(customEmojisLookup.entries()).reduce((main, [key, value]) => ({...main, [key]: value}), {}) md = new MarkdownIt(markdownItConfig) .use(markdown_it_sub) .use(markdown_it_sup)