Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
u1-liquid committed Oct 29, 2023
1 parent c4a9d44 commit 09a9ab9
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions packages/frontend/src/components/MkEmojiPicker.vue
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 09a9ab9

Please sign in to comment.