fix: data.attachments is undefined for emails without body (#6403)

This commit is contained in:
Pranav Raj S
2023-02-06 11:45:15 -08:00
committed by GitHub
parent 5902c7a5e1
commit 527bf593b1

View File

@@ -105,7 +105,7 @@
v-if="isBubble && !isMessageDeleted"
:is-open="showContextMenu"
:show-copy="hasText"
:show-delete="hasTextOrAttachment"
:show-delete="hasText || hasAttachments"
:show-canned-response-option="isOutgoing && hasText"
:menu-position="contextMenuPosition"
:message-content="data.content"
@@ -309,9 +309,6 @@ export default {
hasText() {
return !!this.data.content;
},
hasTextOrAttachment() {
return this.hasText || this.data.attachments.length > 0;
},
tooltipForSender() {
const name = this.senderNameForAvatar;
const { message_type: messageType } = this.data;