From 803fb0898ab20a47871be06facd29256724fd339 Mon Sep 17 00:00:00 2001 From: syuilo Date: Tue, 5 Feb 2019 14:56:33 +0900 Subject: [PATCH] Fix bug --- src/client/app/sw.js | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/client/app/sw.js b/src/client/app/sw.js index c90e92a79e..ccf6dc818e 100644 --- a/src/client/app/sw.js +++ b/src/client/app/sw.js @@ -4,7 +4,6 @@ import composeNotification from './common/scripts/compose-notification'; import { erase } from '../../prelude/array'; -import { clientVersion } from './config'; // キャッシュするリソース const cachee = [ @@ -17,7 +16,7 @@ self.addEventListener('install', ev => { ev.waitUntil(Promise.all([ self.skipWaiting(), // Force activate - caches.open(clientVersion).then(cache => cache.addAll(cachee)) // Cache + caches.open(_VERSION_).then(cache => cache.addAll(cachee)) // Cache ])); }); @@ -26,7 +25,7 @@ self.addEventListener('activate', ev => { // Clean up old caches ev.waitUntil( caches.keys().then(keys => Promise.all( - erase(clientVersion, keys) + erase(_VERSION_, keys) .map(key => caches.delete(key)) )) );