diff --git a/apps/web/vite.config.ts b/apps/web/vite.config.ts index 439949c..1f9884e 100644 --- a/apps/web/vite.config.ts +++ b/apps/web/vite.config.ts @@ -123,6 +123,7 @@ self.addEventListener("fetch", (event) => { if (event.request.mode === "navigate") { event.respondWith( fetch(event.request).then((response) => { + if (!response.ok) throw new Error("navigation unavailable"); const copy = response.clone(); void caches.open(CACHE_NAME).then((cache) => cache.put("/", copy)); return response;