Skip to content

Commit

Permalink
fixed build error
Browse files Browse the repository at this point in the history
  • Loading branch information
smritidoneria committed Jul 25, 2024
1 parent ca17cfb commit 7514d1e
Showing 1 changed file with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,9 @@ const ChatInputFormattingToolbar = ({

const handleEmojiClick = (emojiEvent) => {
const [emoji] = emojiEvent.names;
const updatedMessageWithEmoji =
messageRef.current.value + ` :${emoji.replace(/[\s-]+/g, '_')}: `;
const updatedMessageWithEmoji = `${
messageRef.current.value ?? ''
} :${emoji.replace(/[\s-]+/g, '_')}: `;
messageRef.current.value = updatedMessageWithEmoji;
onTextChange({ target: { value: updatedMessageWithEmoji } });
};
Expand Down

0 comments on commit 7514d1e

Please sign in to comment.