Chats: don't display "copy" button if there's no text to copy

This commit is contained in:
Alex Gleason 2023-01-17 14:34:31 -06:00
parent 687fcdc294
commit f823690b7e
No known key found for this signature in database
GPG Key ID: 7211D1F99744FBB7
1 changed files with 1 additions and 1 deletions

View File

@ -246,7 +246,7 @@ const ChatMessageList: React.FC<IChatMessageList> = ({ chat }) => {
const menu: Menu = []; const menu: Menu = [];
if (navigator.clipboard) { if (navigator.clipboard && chatMessage.content) {
menu.push({ menu.push({
text: intl.formatMessage(messages.copy), text: intl.formatMessage(messages.copy),
action: () => handleCopyText(chatMessage), action: () => handleCopyText(chatMessage),