summaryrefslogtreecommitdiff
path: root/addons/web/static/src
diff options
context:
space:
mode:
authorChristophe Simonis <chs@odoo.com>2018-05-02 15:34:42 +0200
committerChristophe Simonis <chs@odoo.com>2018-05-02 15:34:42 +0200
commit320b631c81c84851bf8856f3e6996ffe76067729 (patch)
treef5a8e47e4bbe38af90506aefbcb03b2afbd2b9fa /addons/web/static/src
parent1bf3429b23c125982f09cc3e8b47d45413a2d25d (diff)
parent810603f4ef0d751a15195f92e912ab18b11a9478 (diff)
[MERGE] forward port branch saas-15 up to 810603f4ef0
Diffstat (limited to 'addons/web/static/src')
-rw-r--r--addons/web/static/src/js/core/ajax.js8
1 files changed, 6 insertions, 2 deletions
diff --git a/addons/web/static/src/js/core/ajax.js b/addons/web/static/src/js/core/ajax.js
index 0ee6d2ad1ed..2912b319df2 100644
--- a/addons/web/static/src/js/core/ajax.js
+++ b/addons/web/static/src/js/core/ajax.js
@@ -260,8 +260,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();