From a1284757ffba1a03925f8607fb544f4e3ba5d5ba Mon Sep 17 00:00:00 2001 From: mattyatea Date: Sun, 24 Dec 2023 00:18:39 +0900 Subject: [PATCH] bug fix --- packages/frontend/src/components/MkEmojiPicker.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/frontend/src/components/MkEmojiPicker.vue b/packages/frontend/src/components/MkEmojiPicker.vue index 555380d800..c452aad918 100644 --- a/packages/frontend/src/components/MkEmojiPicker.vue +++ b/packages/frontend/src/components/MkEmojiPicker.vue @@ -158,7 +158,7 @@ const customEmojiFolderRoot: CustomEmojiFolderTree = { value: '', category: '', function parseAndMergeCategories(input: string, root: CustomEmojiFolderTree): CustomEmojiFolderTree { const parts = input.split('/').map(p => p.trim()); // スラッシュで区切って配列にしてる let currentNode: CustomEmojiFolderTree = root; // currentNode は root - let includesPart = customEmojis.value.some(emoji => emoji.category.includes(parts[0]+'/')) ; + let includesPart = customEmojis.value.some(emoji => emoji.category !== null && emoji.category.includes(parts[0]+'/')) ; console.log(includesPart) if (parts.length === 1 && parts[0] !== '' && includesPart) { // parts が 1 つで空じゃなかったら parts.push(parts[0]) // parts に parts[0] を追加 (test category だったら test/test category になる)