From bb2c6e0326be2be26ebb4abdbcc5705ce16dd938 Mon Sep 17 00:00:00 2001 From: fly_mc Date: Wed, 13 Nov 2024 19:21:09 +0800 Subject: [PATCH] fix: clear Service Worker caches correctly --- packages/sw/src/sw.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/sw/src/sw.ts b/packages/sw/src/sw.ts index 3b915ec68..371d2e009 100644 --- a/packages/sw/src/sw.ts +++ b/packages/sw/src/sw.ts @@ -36,7 +36,7 @@ globalThis.addEventListener('activate', ev => { caches.keys() .then(cacheNames => Promise.all( cacheNames - .filter((v) => v !== swLang.cacheName && !v.startsWith('misskey-static-')) + .filter((v) => v !== STATIC_CACHE_NAME && v !== swLang.cacheName) .map(name => caches.delete(name)), )) .then(() => globalThis.clients.claim()),