review comments

This commit is contained in:
Min Idzelis 2025-06-04 23:50:20 +00:00
parent b71e2da3f9
commit 0a8dd1cfe9

View File

@ -19,10 +19,6 @@ export function handleFetchEvent(event: FetchEvent): void {
const url = new URL(event.request.url);
if (isIgnoredFileType(url.pathname) || isIgnoredPath(url.pathname)) {
return;
}
if (APP_RESOURCES.includes(url.pathname)) {
event.respondWith(getCachedOrFetch(event.request));
return;
@ -33,6 +29,10 @@ export function handleFetchEvent(event: FetchEvent): void {
return;
}
if (isIgnoredFileType(url.pathname) || isIgnoredPath(url.pathname)) {
return;
}
const slash = new URL('/', url.origin);
event.respondWith(getCachedOrFetch(slash));
}