Emoji Picker: Fix missing all emojis (#1378)

This commit is contained in:
Alexander Zinchuk 2021-08-16 14:21:26 +03:00
parent 66b8a2803c
commit 37d866e31d

View File

@ -58,6 +58,10 @@ const EmojiCategory: FC<OwnProps> = ({
>
{shouldRender && category.emojis.map((name) => {
const emoji = allEmojis[name];
// Recent emojis may contain emoticons that are no longer in the list
if (!emoji) {
return undefined;
}
// Some emojis have multiple skins and are represented as an Object with emojis for all skins.
// For now, we select only the first emoji with 'neutral' skin.
const displayedEmoji = 'id' in emoji ? emoji : emoji[1];