Update path check for cache

This commit is contained in:
ernstmul
2024-11-13 13:42:06 +01:00
parent 33a7d9aeb2
commit 19a447fc7a
+1 -1
View File
@@ -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());
}