mirror of
https://activitypub.software/TransFem-org/Sharkey.git
synced 2024-12-15 05:05:42 +01:00
Fix bug
This commit is contained in:
parent
01983da514
commit
803fb0898a
1 changed files with 2 additions and 3 deletions
|
@ -4,7 +4,6 @@
|
||||||
|
|
||||||
import composeNotification from './common/scripts/compose-notification';
|
import composeNotification from './common/scripts/compose-notification';
|
||||||
import { erase } from '../../prelude/array';
|
import { erase } from '../../prelude/array';
|
||||||
import { clientVersion } from './config';
|
|
||||||
|
|
||||||
// キャッシュするリソース
|
// キャッシュするリソース
|
||||||
const cachee = [
|
const cachee = [
|
||||||
|
@ -17,7 +16,7 @@ self.addEventListener('install', ev => {
|
||||||
|
|
||||||
ev.waitUntil(Promise.all([
|
ev.waitUntil(Promise.all([
|
||||||
self.skipWaiting(), // Force activate
|
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
|
// Clean up old caches
|
||||||
ev.waitUntil(
|
ev.waitUntil(
|
||||||
caches.keys().then(keys => Promise.all(
|
caches.keys().then(keys => Promise.all(
|
||||||
erase(clientVersion, keys)
|
erase(_VERSION_, keys)
|
||||||
.map(key => caches.delete(key))
|
.map(key => caches.delete(key))
|
||||||
))
|
))
|
||||||
);
|
);
|
||||||
|
|
Loading…
Reference in a new issue