We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents b208766 + 3f5158e commit 4a6ee47Copy full SHA for 4a6ee47
src/components/ChatAutoComplete/ChatAutoComplete.js
@@ -31,8 +31,8 @@ const ChatAutoComplete = (props) => {
31
const emojiReplace = (word) => {
32
const found = emojiIndex?.search(word) || [];
33
const emoji = found.slice(0, 10).find(
34
- /** @type {{ ({ emoticons } : import('emoji-mart').EmojiData): boolean }} */
35
- ({ emoticons }) => !!emoticons?.includes(word),
+ /** @type {{ ({ emoticons } : import('emoji-mart').EmojiData): boolean }} | undefined */
+ (match) => !!match?.emoticons?.includes(word),
36
);
37
if (!emoji || !('native' in emoji)) return null;
38
return emoji.native;
0 commit comments