make autocomplete work again

pull/21833/head
Matthew Hodgson 2019-05-19 20:56:07 +01:00
parent dbc6815abf
commit 64e2de5b47
1 changed files with 2 additions and 1 deletions

View File

@ -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: {