Skip to content
This repository was archived by the owner on Apr 19, 2021. It is now read-only.

Commit f3ef71e

Browse files
committed
1 parent d09c6ee commit f3ef71e

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

‎src/service-worker.ts

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -45,9 +45,7 @@ self.addEventListener("fetch", <EventType extends FetchEvent>(event: EventType)
4545

4646
// always serve static files and bundler-generated assets from cache
4747
if (url.host === self.location.host && cached.has(url.pathname)) {
48-
caches.match(event.request).then((match): void => {
49-
if (match) event.respondWith(match);
50-
});
48+
event.respondWith(caches.match(event.request) as Promise<Response>);
5149
return;
5250
}
5351

0 commit comments

Comments
 (0)