From 230857862283f432101233333cf3089a15ef2076 Mon Sep 17 00:00:00 2001 From: ginnyTheCat Date: Wed, 23 Feb 2022 04:05:06 +0100 Subject: [PATCH] Fix input freeze on sending message (#343) --- src/app/organisms/emoji-board/emoji.js | 1 + src/app/organisms/view-source/ViewSource.jsx | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/src/app/organisms/emoji-board/emoji.js b/src/app/organisms/emoji-board/emoji.js index 878a0198..4f76f7c6 100644 --- a/src/app/organisms/emoji-board/emoji.js +++ b/src/app/organisms/emoji-board/emoji.js @@ -53,6 +53,7 @@ function addToGroup(emoji) { const emojis = []; emojisData.forEach((emoji) => { const myShortCodes = shortcodes[emoji.hexcode]; + if (!myShortCodes) return; const em = { ...emoji, shortcode: Array.isArray(myShortCodes) ? myShortCodes[0] : myShortCodes, diff --git a/src/app/organisms/view-source/ViewSource.jsx b/src/app/organisms/view-source/ViewSource.jsx index a79a4d9c..9bd3334f 100644 --- a/src/app/organisms/view-source/ViewSource.jsx +++ b/src/app/organisms/view-source/ViewSource.jsx @@ -65,7 +65,7 @@ function ViewSource() { onRequestClose={() => setIsOpen(false)} contentOptions={ setIsOpen(false)} tooltip="Close" />} > - {event && renderViewSource()} + {event ? renderViewSource() :
} ); }