From 64e2de5b47ca2e081bbd38637e0e4132cfe853f5 Mon Sep 17 00:00:00 2001 From: Matthew Hodgson Date: Sun, 19 May 2019 20:56:07 +0100 Subject: [PATCH] make autocomplete work again --- src/components/views/rooms/MessageComposerInput.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/components/views/rooms/MessageComposerInput.js b/src/components/views/rooms/MessageComposerInput.js index 2e933964d4..984ad2be27 100644 --- a/src/components/views/rooms/MessageComposerInput.js +++ b/src/components/views/rooms/MessageComposerInput.js @@ -534,7 +534,8 @@ export default class MessageComposerInput extends React.Component { // The first matched group includes just the matched plaintext emoji const emoticonMatch = REGEX_EMOTICON_WHITESPACE.exec(text.slice(0, currentStartOffset)); if (emoticonMatch) { - const unicodeEmoji = EMOJIBASE.find(e => e.emoticon && e.emoticon.contains(emoticonMatch[1])); + const data = EMOJIBASE.find(e => e.emoticon === emoticonMatch[1]); + const unicodeEmoji = data ? data.unicode : ''; const range = Range.create({ anchor: {