Skip to content

Commit

Permalink
Regression: Emojis displaying as :undefined: (#26141)
Browse files Browse the repository at this point in the history
  • Loading branch information
gabriellsh authored and weslley543 committed Jul 8, 2022
1 parent 537de81 commit bc2a0a1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/gazzodown/src/emoji/Emoji.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit bc2a0a1

Please sign in to comment.