1
0
mirror of https://github.com/matrix-org/matrix-react-sdk.git synced 2025-11-20 16:22:28 +03:00

make autocomplete work again

This commit is contained in:
Matthew Hodgson
2019-05-19 20:56:07 +01:00
parent dbc6815abf
commit 64e2de5b47

View File

@@ -534,7 +534,8 @@ export default class MessageComposerInput extends React.Component {
// The first matched group includes just the matched plaintext emoji // The first matched group includes just the matched plaintext emoji
const emoticonMatch = REGEX_EMOTICON_WHITESPACE.exec(text.slice(0, currentStartOffset)); const emoticonMatch = REGEX_EMOTICON_WHITESPACE.exec(text.slice(0, currentStartOffset));
if (emoticonMatch) { 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({ const range = Range.create({
anchor: { anchor: {