Commit a7bb5b65 authored by Vincent Bechu's avatar Vincent Bechu

[erp5_officejs] Bootloader, catch fetch error on service worker

parent b4bedbaf
......@@ -60,6 +60,13 @@ var global = self, window = self;
.push(function () {
return fetch(event.request);
})
.push(undefined, function (error) {
if (error.name === 'TypeError' &&
error.message === 'Failed to fetch') {
return {};
}
throw error;
})
.push(function (response) {
if (response.status === 200) {
return response;
......
......@@ -227,7 +227,7 @@
</item>
<item>
<key> <string>serial</string> </key>
<value> <string>963.3430.40377.1177</string> </value>
<value> <string>963.21942.41432.32153</string> </value>
</item>
<item>
<key> <string>state</string> </key>
......@@ -245,7 +245,7 @@
</tuple>
<state>
<tuple>
<float>1509458653.61</float>
<float>1510223814.46</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