fixed copy-pasting leftovers

This commit is contained in:
Dym Sohin 2020-09-21 18:13:31 +02:00
parent cff202241b
commit bb59b8ee56
1 changed files with 3 additions and 3 deletions

View File

@ -15,10 +15,10 @@ const filterByKeyword = (list, keyword = '') => {
for (const emoji of list) {
const indexOfKeyword = emoji.displayText.toLowerCase().indexOf(keywordLowercase)
if (indexOfKeyword > -1) {
if (!Array.isArray(orderedEmojiList[keywordLowercase])) {
orderedEmojiList[keywordLowercase] = []
if (!Array.isArray(orderedEmojiList[indexOfKeyword])) {
orderedEmojiList[indexOfKeyword] = []
}
orderedEmojiList[keywordLowercase].push(emoji)
orderedEmojiList[indexOfKeyword].push(emoji)
}
}
return orderedEmojiList.flat()