1
0
mirror of https://github.com/hotomoe/hotomoe synced 2024-12-05 10:18:09 +09:00

Force service worker activate

This commit is contained in:
syuilo 2017-11-28 15:09:58 +09:00
parent 6078363311
commit 10c943d28a

View File

@ -13,8 +13,10 @@ const cachee = [
self.addEventListener('install', ev => { self.addEventListener('install', ev => {
console.info('installed'); console.info('installed');
// Cache ev.waitUntil(Promise.all([
ev.waitUntil(caches.open(_VERSION_).then(cache => cache.addAll(cachee))); self.skipWaiting(), // Force activate
caches.open(_VERSION_).then(cache => cache.addAll(cachee)) // Cache
]));
}); });
// アクティベートされたとき // アクティベートされたとき