1
0
mirror of https://github.com/misskey-dev/misskey synced 2024-12-05 02:09:02 +09:00
This commit is contained in:
syuilo 2019-02-05 14:56:33 +09:00
parent 01983da514
commit 803fb0898a
No known key found for this signature in database
GPG Key ID: BDC4C49D06AB9D69

View File

@ -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))
))
);