[FIX] mail: prevent pos tour from sometimes failing
Here is what could (sometimes) happen in community: - the point of sale tour is started by the runbot - it loads the '/web' url - this instantiate the mail client action (init) - the tour sees that the POS link is in the dom and clicks on it - the action manager destroys the discuss client action (before its start method is called) - the destroy method from the client action is called, this.$buttons is not set, the destroy method causes a traceback
This commit is contained in:
@@ -660,7 +660,9 @@ var ChatAction = Widget.extend(ControlPanelMixin, {
|
||||
});
|
||||
},
|
||||
destroy: function() {
|
||||
this.$buttons.off().destroy();
|
||||
if (this.$buttons) {
|
||||
this.$buttons.off().destroy();
|
||||
}
|
||||
this._super.apply(this, arguments);
|
||||
},
|
||||
|
||||
|
||||
Reference in New Issue
Block a user