diff --git a/addons/mail/static/src/components/attachment/attachment.js b/addons/mail/static/src/components/attachment/attachment.js index 6dc894027d9..f62113c4c41 100644 --- a/addons/mail/static/src/components/attachment/attachment.js +++ b/addons/mail/static/src/components/attachment/attachment.js @@ -131,6 +131,9 @@ class Attachment extends Component { */ _onClickUnlink(ev) { ev.stopPropagation(); + if (!this.attachment) { + return; + } if (this.attachment.isLinkedToComposer) { this.attachment.remove(); this.trigger('o-attachment-removed', { attachmentLocalId: this.props.attachmentLocalId });