diff options
| author | Christophe Matthieu <chm@odoo.com> | 2017-12-14 11:42:10 +0100 |
|---|---|---|
| committer | Nicolas Martinelli <nim-odoo@users.noreply.github.com> | 2017-12-19 13:35:36 +0100 |
| commit | fdf0f014bf1f42d72ee57161a7a343bb2b7cd9a2 (patch) | |
| tree | f68990d3b22a497b4b96256696ccdc0c6ebe99ce | |
| parent | 102e8384737a1b6c659d98b9b53a00cbdbfc9659 (diff) | |
[FIX] web: avoid race condition in the website
Depending on the speed of the runbot, errors may appear if one tries to
use a template that is not yet loaded. Templates are being
loaded and we add new template to read, the ready function does not
take into account new additions.
| -rw-r--r-- | addons/web_editor/static/src/js/base.js | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/addons/web_editor/static/src/js/base.js b/addons/web_editor/static/src/js/base.js index f7245f6689d..7bf9c2aa641 100644 --- a/addons/web_editor/static/src/js/base.js +++ b/addons/web_editor/static/src/js/base.js @@ -36,7 +36,7 @@ data.ready = function () { if (!odoo._modules) { all_ready.then(translations); } - } else if(all_ready.state() === "resolved") { // can add async template + } else { // can add async template all_ready = $.when(dom_ready, ajax.loadXML()); } return all_ready; |
