[FIX] mail: prevent crash when cancelling message edit
task-2917199 closes odoo/odoo#95814 Signed-off-by: Louis Wicket (wil) <wil@odoo.com>
This commit is contained in:
@@ -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.
|
||||
|
||||
Reference in New Issue
Block a user