diff options
| author | Christophe Simonis <chs@odoo.com> | 2018-05-02 14:49:58 +0200 |
|---|---|---|
| committer | Christophe Simonis <chs@odoo.com> | 2018-05-02 14:49:58 +0200 |
| commit | 810603f4ef0d751a15195f92e912ab18b11a9478 (patch) | |
| tree | 27fa201ef78c9cf21e75bf407d9f79cecf7572f2 /addons/web/static/src | |
| parent | 208a400b0656a42912a1b2cd174e851ad1a9de9f (diff) | |
| parent | 55ce6aff10b7b65650cfa114222333b86b4ef8d5 (diff) | |
[MERGE] forward port branch saas-14 up to 55ce6aff10b
Diffstat (limited to 'addons/web/static/src')
| -rw-r--r-- | addons/web/static/src/js/framework/ajax.js | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/addons/web/static/src/js/framework/ajax.js b/addons/web/static/src/js/framework/ajax.js index dee6f4599b4..e74ae67dc04 100644 --- a/addons/web/static/src/js/framework/ajax.js +++ b/addons/web/static/src/js/framework/ajax.js @@ -252,8 +252,12 @@ function get_file(options) { if (options.error) { var body = this.contentDocument.body; var nodes = body.children.length === 0 ? body.childNodes : body.children; - var node = nodes[1] || nodes[0]; - options.error(JSON.parse(node.textContent)); + options.error({ + message: nodes.length > 1 ? nodes[1].textContent : '', + data: { + title: nodes.length > 0 ? nodes[0].textContent : '', + }, + }); } } finally { complete(); |
