Web: Clients: Uncommented self.skipWaiting() on install service-worker

This commit is contained in:
Alexey Safronov 2020-09-01 17:53:24 +03:00
parent bfee8e1365
commit bc8613c4f6
3 changed files with 12 additions and 12 deletions

View File

@ -13,10 +13,10 @@ if ("function" === typeof importScripts) {
// to force update an exiting service worker.
// Since we're using `injectManifest` to build SW,
// manually overriding the skipWaiting();
// self.addEventListener("install", event => {
// self.skipWaiting();
// window.location.reload();
// });
self.addEventListener("install", event => {
self.skipWaiting();
window.location.reload();
});
/* injection point for manifest files. */
workbox.precaching.precacheAndRoute(self.__WB_MANIFEST);

View File

@ -13,10 +13,10 @@ if ("function" === typeof importScripts) {
// to force update an exiting service worker.
// Since we're using `injectManifest` to build SW,
// manually overriding the skipWaiting();
// self.addEventListener("install", event => {
// self.skipWaiting();
// window.location.reload();
// });
self.addEventListener("install", event => {
self.skipWaiting();
window.location.reload();
});
/* injection point for manifest files. */
workbox.precaching.precacheAndRoute(self.__WB_MANIFEST);

View File

@ -13,10 +13,10 @@ if ("function" === typeof importScripts) {
// to force update an exiting service worker.
// Since we're using `injectManifest` to build SW,
// manually overriding the skipWaiting();
// self.addEventListener("install", event => {
// self.skipWaiting();
// window.location.reload();
// });
self.addEventListener("install", event => {
self.skipWaiting();
window.location.reload();
});
/* injection point for manifest files. */
workbox.precaching.precacheAndRoute(self.__WB_MANIFEST);