Commit c812f496 authored by Romain Courteaud's avatar Romain Courteaud

[erp5_web_renderjs_ui] Do not crash when network is down

parent ce885bda
......@@ -512,8 +512,11 @@ and handling data send&receive.
// If the response is JSON, then look for the translated message sent
// by the portal and display it to the user
if (error.target.response.type === 'application/json' ||
error.target.response.type === 'application/hal+json') {
if (error.target.response && (
error.target.response.type === 'application/json' ||
error.target.response.type === 'application/hal+json'
)
) {
return gadget.notifySubmitted()
.push(function () {
......
......@@ -228,7 +228,7 @@
</item>
<item>
<key> <string>serial</string> </key>
<value> <string>975.56533.48127.29525</string> </value>
<value> <string>976.34271.30288.29832</string> </value>
</item>
<item>
<key> <string>state</string> </key>
......@@ -246,7 +246,7 @@
</tuple>
<state>
<tuple>
<float>1558448080.86</float>
<float>1561044454.34</float>
<string>UTC</string>
</tuple>
</state>
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment