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 {
for (const emoji of emojis) {
if (emoji.name === newQ) {
matches.add(emoji);
if (matches.size >= max) break;
}
if (customEmojisMap.has(newQ)) {
matches.add(customEmojisMap.get(newQ)!);
}
if (matches.size >= max) return matches;