[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.
This commit is contained in:
@@ -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"/>
|
||||
|
||||
Reference in New Issue
Block a user