diff --git a/src/sw.js b/src/sw.js index 3e80454..86ec4b2 100644 --- a/src/sw.js +++ b/src/sw.js @@ -1,6 +1,7 @@ const CACHE_NAME = 'hubl-store-dev'; self.addEventListener('install', function (e) { + self.skipWaiting(); e.waitUntil( caches.open(CACHE_NAME).then(function (cache) { return cache.addAll([ @@ -11,7 +12,7 @@ self.addEventListener('install', function (e) { '/index.html', '/' ]); - }).then(() => e.skipWaiting()) + }) ); });