From d57e0cb1e7bc8d866fc847b67343e59fde08ccd9 Mon Sep 17 00:00:00 2001 From: qsm-odoo Date: Fri, 15 Nov 2019 11:40:35 +0000 Subject: [PATCH] [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) --- addons/web_editor/static/src/js/editor/snippets.editor.js | 1 + 1 file changed, 1 insertion(+) diff --git a/addons/web_editor/static/src/js/editor/snippets.editor.js b/addons/web_editor/static/src/js/editor/snippets.editor.js index f0b1b1e2549..4258fda46a1 100644 --- a/addons/web_editor/static/src/js/editor/snippets.editor.js +++ b/addons/web_editor/static/src/js/editor/snippets.editor.js @@ -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