Commit cacf297b authored by Boris Kocherov's avatar Boris Kocherov

erp5_officejs: bypass only network error for offline mode.

thx @cedric.leninivin
parent 00ef5b20
......@@ -361,9 +361,15 @@
});
}
})
.push(undefined, function () {
.push(undefined, function (error) {
// fix offline mode bypass network errors
return {};
if (error instanceof ProgressEvent &&
error.srcElement instanceof XMLHttpRequest &&
error.type === "error") {
return {};
} else {
throw error;
}
})
.push(function () {
navigator.serviceWorker.register('gadget_officejs_' + NAME + '_serviceworker.js')
......
......@@ -224,7 +224,7 @@
</item>
<item>
<key> <string>serial</string> </key>
<value> <string>953.38699.20687.494</string> </value>
<value> <string>953.39253.53631.25634</string> </value>
</item>
<item>
<key> <string>state</string> </key>
......@@ -242,7 +242,7 @@
</tuple>
<state>
<tuple>
<float>1472598463.59</float>
<float>1472633353.37</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