mirror of
https://github.com/Foundry376/Mailspring.git
synced 2025-02-25 08:35:16 +08:00
Properly handle scenario where emoji mark cannot be found #685
This commit is contained in:
parent
ba505ac66e
commit
f74236ec03
1 changed files with 2 additions and 1 deletions
|
@ -69,11 +69,12 @@ function FloatingEmojiPicker({ value, onChange }) {
|
|||
let emoji = null;
|
||||
try {
|
||||
emoji = value.marks.find(i => i.type === EMOJI_TYPING_TYPE);
|
||||
if (!emoji) return false;
|
||||
} catch (err) {
|
||||
// sometimes fails for some reason
|
||||
}
|
||||
|
||||
if (!emoji) return false;
|
||||
|
||||
const picked = emoji.data.get('picked');
|
||||
const suggestions = emoji.data.get('suggestions');
|
||||
if (!suggestions || !suggestions.length) return false;
|
||||
|
|
Loading…
Reference in a new issue