From 19a447fc7aee0e39fd9b896bbb12ae4fa55a7242 Mon Sep 17 00:00:00 2001 From: ernstmul Date: Wed, 13 Nov 2024 13:42:06 +0100 Subject: [PATCH] Update path check for cache --- src/service-worker.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/service-worker.ts b/src/service-worker.ts index eae3992e7..b34bc0445 100644 --- a/src/service-worker.ts +++ b/src/service-worker.ts @@ -23,7 +23,7 @@ sw.addEventListener('install', (event) => { } // Check if the page URL does not match the exclusion path - const shouldCache = !base.startsWith('/console/auth'); + const shouldCache = !location.pathname.startsWith(`${base}/auth`); if (shouldCache) { event.waitUntil(addFilesToCache()); }