diff --git a/addons/mail/static/src/models/composer_view.js b/addons/mail/static/src/models/composer_view.js index 9ca00a83f2f..2b03e04bd5b 100644 --- a/addons/mail/static/src/models/composer_view.js +++ b/addons/mail/static/src/models/composer_view.js @@ -50,6 +50,7 @@ registerModel({ discard() { if (this.messageViewInEditing) { this.messageViewInEditing.stopEditing(); + return; } if (this.threadView && this.threadView.replyingToMessageView) { const { threadView } = this; @@ -180,7 +181,9 @@ registerModel({ */ onClickCancelLink(ev) { ev.preventDefault(); - this.discard(); + if (this.exists()) { + this.discard(); + } }, /** * Discards the composer when clicking away.