Make small code style improvements
This commit is contained in:
parent
d178be7576
commit
da17e4ee8a
3 changed files with 4 additions and 16 deletions
|
@ -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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue