make reactions-search case-insensitive

This commit is contained in:
Dym Sohin 2020-07-14 19:47:02 +00:00
parent 297a0c1f7f
commit 00d662c4a0

View File

@ -28,7 +28,10 @@ const ReactButton = {
}, },
emojis () { emojis () {
if (this.filterWord !== '') { if (this.filterWord !== '') {
return this.$store.state.instance.emoji.filter(emoji => emoji.displayText.includes(this.filterWord)) const filterWordLowercase = this.filterWord.toLowerCase()
return this.$store.state.instance.emoji.filter(emoji =>
emoji.displayText.toLowerCase().includes(filterWordLowercase)
)
} }
return this.$store.state.instance.emoji || [] return this.$store.state.instance.emoji || []
}, },