This commit is contained in:
Jean-Baptiste Pasquier 2020-10-28 17:38:54 +01:00
parent 7f970ff899
commit 37a0c62ccf

View File

@ -1,6 +1,7 @@
const CACHE_NAME = 'hubl-store-dev'; const CACHE_NAME = 'hubl-store-dev';
self.addEventListener('install', function (e) { self.addEventListener('install', function (e) {
self.skipWaiting();
e.waitUntil( e.waitUntil(
caches.open(CACHE_NAME).then(function (cache) { caches.open(CACHE_NAME).then(function (cache) {
return cache.addAll([ return cache.addAll([
@ -11,7 +12,7 @@ self.addEventListener('install', function (e) {
'/index.html', '/index.html',
'/' '/'
]); ]);
}).then(() => e.skipWaiting()) })
); );
}); });