Commit b4bedbaf authored by Vincent Bechu's avatar Vincent Bechu

[erp5_officejs] Bootloader, restart install when serviceworker registration fail

parent 53a4d1b1
......@@ -166,6 +166,11 @@ var repair = false;
storage = createStorage(gadget);
if (navigator.serviceWorker !== undefined) {
return storage.repair()
.push(function () {
return navigator.serviceWorker.register(
"gadget_officejs_bootloader_serviceworker.js"
);
})
.push(undefined, function (error) {
return gadget.changeState({
error_amount: gadget.state.error_amount + 1,
......@@ -177,11 +182,6 @@ var repair = false;
.push(function () {
return gadget.install();
});
})
.push(function () {
return navigator.serviceWorker.register(
"gadget_officejs_bootloader_serviceworker.js"
);
});
}
return;
......
......@@ -222,7 +222,7 @@
</item>
<item>
<key> <string>actor</string> </key>
<value> <string>zope</string> </value>
<value> <string>vincent</string> </value>
</item>
<item>
<key> <string>comment</string> </key>
......@@ -236,7 +236,7 @@
</item>
<item>
<key> <string>serial</string> </key>
<value> <string>962.14302.13214.21742</string> </value>
<value> <string>963.20662.59245.4181</string> </value>
</item>
<item>
<key> <string>state</string> </key>
......@@ -254,7 +254,7 @@
</tuple>
<state>
<tuple>
<float>1506412140.67</float>
<float>1510149659.24</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