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