summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorsyuilo <syuilotan@yahoo.co.jp>2017-11-28 15:09:58 +0900
committersyuilo <syuilotan@yahoo.co.jp>2017-11-28 15:09:58 +0900
commit10c943d28aca42f8540eadd9dc173e864b7d1741 (patch)
tree42e17abc1b8e36918de41271a7bfe69bb8bfde2d /src
parent:v: (diff)
downloadmisskey-10c943d28aca42f8540eadd9dc173e864b7d1741.tar.gz
misskey-10c943d28aca42f8540eadd9dc173e864b7d1741.tar.bz2
misskey-10c943d28aca42f8540eadd9dc173e864b7d1741.zip
Force service worker activate
Diffstat (limited to 'src')
-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
+ ]));
});
// アクティベートされたとき