Commit 73de09a7 authored by Yusei Tahara's avatar Yusei Tahara Committed by Romain Courteaud

[erp5_web_renderjs_ui] If service worker failed to install cache, unregister...

[erp5_web_renderjs_ui] If service worker failed to install cache, unregister this service worker explicitly.
parent 9526362a
...@@ -215,11 +215,13 @@ ...@@ -215,11 +215,13 @@
return self.skipWaiting(); return self.skipWaiting();
} }
}) })
.catch(function () { .catch(function (error) {
// Since we do not allow to override existing cache, if cache installation // Since we do not allow to override existing cache, if cache installation
// failed, we need to delete the cache completely. // failed, we need to delete the cache completely.
caches.delete(CACHE_NAME); caches.delete(CACHE_NAME);
throw "Download failed! Deleted " + CACHE_NAME; // Explicitly unregister service worker else it may not be done.
self.registration.unregister();
throw error;
}); });
} }
}) })
......
...@@ -228,7 +228,7 @@ ...@@ -228,7 +228,7 @@
</item> </item>
<item> <item>
<key> <string>serial</string> </key> <key> <string>serial</string> </key>
<value> <string>976.15237.62291.34798</string> </value> <value> <string>976.15482.50361.52206</string> </value>
</item> </item>
<item> <item>
<key> <string>state</string> </key> <key> <string>state</string> </key>
...@@ -246,7 +246,7 @@ ...@@ -246,7 +246,7 @@
</tuple> </tuple>
<state> <state>
<tuple> <tuple>
<float>1559902712.53</float> <float>1559917201.4</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