This commit is contained in:
mattyatea 2023-12-24 00:18:39 +09:00
parent 77ce5d2da3
commit a1284757ff
1 changed files with 1 additions and 1 deletions

View File

@ -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 )