summaryrefslogtreecommitdiff
path: root/src/web/app
diff options
context:
space:
mode:
Diffstat (limited to 'src/web/app')
-rw-r--r--src/web/app/sw.js6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/web/app/sw.js b/src/web/app/sw.js
index 1b3220d23d..2074ee39c4 100644
--- a/src/web/app/sw.js
+++ b/src/web/app/sw.js
@@ -13,8 +13,10 @@ const cachee = [
self.addEventListener('install', ev => {
console.info('installed');
- // Cache
- ev.waitUntil(caches.open(_VERSION_).then(cache => cache.addAll(cachee)));
+ ev.waitUntil(Promise.all([
+ self.skipWaiting(), // Force activate
+ caches.open(_VERSION_).then(cache => cache.addAll(cachee)) // Cache
+ ]));
});
// アクティベートされたとき