From 26ee41f32df0dc248cd6c059cd2962db1f8722c6 Mon Sep 17 00:00:00 2001 From: Beefox Date: Sat, 10 Sep 2022 16:36:12 +1000 Subject: [PATCH] Allow for searching unicode emoji via inputting emoji (This is needed for the react menu) --- src/components/emoji_picker/emoji_picker.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/emoji_picker/emoji_picker.js b/src/components/emoji_picker/emoji_picker.js index 3b355ca6..13533bb0 100644 --- a/src/components/emoji_picker/emoji_picker.js +++ b/src/components/emoji_picker/emoji_picker.js @@ -138,7 +138,7 @@ const EmojiPicker = { if (this.keyword === '') return list const regex = new RegExp(escapeRegExp(trim(this.keyword)), 'i') return list.filter(emoji => { - return regex.test(emoji.displayText) + return (regex.test(emoji.displayText) || (!emoji.imageUrl && emoji.replacement === this.keyword)) }) } },