improve performance

This commit is contained in:
1Step621 2024-01-07 14:39:15 +09:00
parent 2ef2be8494
commit abd777f9ff
1 changed files with 2 additions and 5 deletions

View File

@ -221,11 +221,8 @@ watch(q, () => {
} }
} }
} else { } else {
for (const emoji of emojis) { if (customEmojisMap.has(newQ)) {
if (emoji.name === newQ) { matches.add(customEmojisMap.get(newQ)!);
matches.add(emoji);
if (matches.size >= max) break;
}
} }
if (matches.size >= max) return matches; if (matches.size >= max) return matches;