Make small code style improvements

This commit is contained in:
nimbleghost 2023-05-24 20:47:19 +02:00
parent d178be7576
commit da17e4ee8a
3 changed files with 4 additions and 16 deletions

View file

@ -127,17 +127,7 @@ const Category = (props) => {
);
};
const emojiMatches = (emoji, words) => {
if (words.length === 0) {
return true;
}
for (const word of words) {
if (emoji.searchBase.indexOf(word) === -1) {
return false;
}
}
return true;
};
const emojiMatches = (emoji, words) => words.length === 0 || words.some((word) => emoji.searchBase.includes(word));
const Emoji = (props) => {
const { emoji } = props;