Chats: don't display "copy" button if there's no text to copy
This commit is contained in:
parent
687fcdc294
commit
f823690b7e
|
@ -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),
|
||||||
|
|
Loading…
Reference in New Issue