[FIX] web_editor: prevent traceback on destroy link tools
When saving a mailing with the link tools open, link tools' destroy is called after OdooEditor's destroy, causing a traceback when link tools tries to set a history step. task-2733825 closes odoo/odoo#84354 X-original-commit: f565f965fdc15d744efd38cfca9b098e24181e7e Signed-off-by: David Monjoie (dmo) <dmo@odoo.com>
This commit is contained in:
@@ -66,7 +66,9 @@ const LinkTools = Link.extend({
|
||||
this.$button.removeClass('active');
|
||||
this.options.wysiwyg.odooEditor.observerActive();
|
||||
this.applyLinkToDom(this._getData());
|
||||
this.options.wysiwyg.odooEditor.historyStep();
|
||||
if (!this.options.wysiwyg.odooEditor.isDestroyed) {
|
||||
this.options.wysiwyg.odooEditor.historyStep();
|
||||
}
|
||||
this._observer.disconnect();
|
||||
this._super(...arguments);
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user