[FIX] web_editor: remove destroyed editors from memory

Commit https://github.com/odoo/odoo/commit/f6bbc40fbe16ea5ab01ad03b8e1519c4e559bf6d
introduced a method to destroy all current editors to refresh them when
necessary... but forgot to empty the array that contains them.

In a 12.0 without custo, this is only slowing down the editor but in
master (or with custo) this makes the editor crash.

closes odoo/odoo#40372

X-original-commit: 2b5661937d9772b98c73f9f64aa419fec7676052
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
This commit is contained in:
qsm-odoo
2019-11-15 17:10:56 +00:00
committed by fw-bot
parent bddf5a6747
commit d57e0cb1e7
@@ -1103,6 +1103,7 @@ var SnippetsMenu = Widget.extend({
_.each(this.snippetEditors, function (snippetEditor) {
snippetEditor.destroy();
});
this.snippetEditors.splice(0);
},
/**
* Calls a given callback 'on' the given snippet and all its child ones if