From 560f2359a0aa8486c49fc3a82c79264dc4ad62c1 Mon Sep 17 00:00:00 2001 From: Denis Ledoux Date: Wed, 21 Jan 2015 17:00:48 +0100 Subject: [PATCH] [FIX] web: correctly retrieve exception from @serialize_exception and _serialize_exception as well. --- addons/web/static/src/js/core.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/addons/web/static/src/js/core.js b/addons/web/static/src/js/core.js index 31a94756246..4bc86dce5ef 100644 --- a/addons/web/static/src/js/core.js +++ b/addons/web/static/src/js/core.js @@ -445,7 +445,8 @@ instance.web.Session.include( /** @lends instance.web.Session# */{ try { if (options.error) { var body = this.contentDocument.body; - var node = body.childNodes[1] || body.childNodes[0]; + var nodes = body.children.length === 0 ? body.childNodes : body.children; + var node = nodes[1] || nodes[0]; options.error(JSON.parse(node.textContent)); } } finally {