[FIX] mail: race condition in mail composer
When an user sends an email from the chatter then quickly switch to another record, it may happen that this.composer is already destroyed. We prevent to display a traceback with this fix.
This commit is contained in:
committed by
Géry Debongnie
parent
17d0117edc
commit
cd13ea9935
@@ -919,7 +919,7 @@ var Chatter = form_common.AbstractField.extend({
|
||||
this.mute_new_message_button(true);
|
||||
},
|
||||
close_composer: function (force) {
|
||||
if (this.composer.is_empty() || force) {
|
||||
if (this.composer && (this.composer.is_empty() || force)) {
|
||||
this.composer.do_hide();
|
||||
this.composer.$input.val('');
|
||||
this.mute_new_message_button(false);
|
||||
|
||||
Reference in New Issue
Block a user