From 5f3bfd43457cc0ec38af3f48699c863eeab3aef7 Mon Sep 17 00:00:00 2001 From: gabriellsh Date: Tue, 5 Jul 2022 18:36:54 -0300 Subject: [PATCH] use value.value as fallback --- packages/gazzodown/src/emoji/Emoji.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/gazzodown/src/emoji/Emoji.tsx b/packages/gazzodown/src/emoji/Emoji.tsx index 2e0a66647799..1052d426d5f5 100644 --- a/packages/gazzodown/src/emoji/Emoji.tsx +++ b/packages/gazzodown/src/emoji/Emoji.tsx @@ -12,7 +12,7 @@ type EmojiProps = MessageParser.Emoji & { const Emoji = ({ big = false, preview = false, ...emoji }: EmojiProps): ReactElement => { const { detectEmoji } = useContext(MarkupInteractionContext); - const fallback = useMemo(() => ('unicode' in emoji ? emoji.unicode : `:${emoji.shortCode}:`), [emoji]); + const fallback = useMemo(() => ('unicode' in emoji ? emoji.unicode : `:${emoji.shortCode ?? emoji.value.value}:`), [emoji]); const descriptors = useMemo(() => { const detected = detectEmoji?.(fallback);