diff --git a/packages/frontend/src/components/MkEmojiPicker.vue b/packages/frontend/src/components/MkEmojiPicker.vue index 8ea826fb3fd0..9d96ed3de69d 100644 --- a/packages/frontend/src/components/MkEmojiPicker.vue +++ b/packages/frontend/src/components/MkEmojiPicker.vue @@ -156,14 +156,11 @@ const tab = ref<'index' | 'custom' | 'unicode' | 'tags'>('index'); const customEmojiFolderRoot: CustomEmojiFolderTree = { value: "", category: "", children: [] }; function parseAndMergeCategories(input: string, root: CustomEmojiFolderTree): CustomEmojiFolderTree { - const parts = input.split('/'); + const parts = input.split('/').map(p => p.trim()); let currentNode: CustomEmojiFolderTree = root; for (const part of parts) { - if (!part) continue; - let existingNode = currentNode.children.find((node) => node.value === part); - if (!existingNode) { const newNode: CustomEmojiFolderTree = { value: part, category: input, children: [] }; currentNode.children.push(newNode);