diff --git a/packages/frontend/src/components/MkAutocomplete.vue b/packages/frontend/src/components/MkAutocomplete.vue index 72783921d..0e16acd33 100644 --- a/packages/frontend/src/components/MkAutocomplete.vue +++ b/packages/frontend/src/components/MkAutocomplete.vue @@ -56,14 +56,14 @@ type EmojiDef = { const lib = emojilist.filter(x => x.category !== 'flags'); +const char2path = defaultStore.state.emojiStyle === 'twemoji' ? char2twemojiFilePath : char2fluentEmojiFilePath; + const emjdb: EmojiDef[] = lib.map(x => ({ emoji: x.char, name: x.name, url: char2path(x.char), })); -const char2path = defaultStore.state.emojiStyle === 'twemoji' ? char2twemojiFilePath : char2fluentEmojiFilePath; - for (const x of lib) { if (x.keywords) { for (const k of x.keywords) {