diff options
| author | xmo-odoo <xmo@odoo.com> | 2017-06-08 14:16:43 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2017-06-08 14:16:43 +0200 |
| commit | 45e94ec756e0da4766110bd3ce94ede4203e4486 (patch) | |
| tree | a4b8d80ec619efb72cb67435dabf5255381ce881 /addons/web/static/src/xml/base.xml | |
| parent | 1612f2cdf797adb1e7639874c8d0138d0d939749 (diff) | |
[FIX] web: CrashManager can crash if trying to show an empty message
If `d.message` is an empty string, `!!d.message` is false and the
crashmanager will try to display `d.error.data.message`… which does
not exist as it's a warning with an empty message not an upstream error.
That causes the crashmanager itself to crash, and even the warning
name/title to be lost.
Diffstat (limited to 'addons/web/static/src/xml/base.xml')
| -rw-r--r-- | addons/web/static/src/xml/base.xml | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/addons/web/static/src/xml/base.xml b/addons/web/static/src/xml/base.xml index c846e969827..161509b364f 100644 --- a/addons/web/static/src/xml/base.xml +++ b/addons/web/static/src/xml/base.xml @@ -22,7 +22,7 @@ <t t-name="CrashManager.warning"> <div class="o_dialog_warning"> <t t-js="d"> - var message = d.message ? d.message : d.error.data.message; + var message = (d.message !== undefined) ? d.message : d.error.data.message; d.html_error = context.engine.tools.html_escape(message).replace(/\n/g, '<br/>'); </t> <t t-raw="html_error"/> |
