Skip to content

Commit

Permalink
fix assets check
Browse files Browse the repository at this point in the history
  • Loading branch information
secondl1ght committed Jun 1, 2023
1 parent f693c5c commit e53628b
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/service-worker.js
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,8 @@ self.addEventListener('fetch', (event) => {

// `build`/`files` can always be served from the cache
if (ASSETS.includes(url.pathname)) {
return cache.match(url.pathname);
const res = await cache.match(url.pathname);
if (res) return res;
}

// for everything else, try the network first, but
Expand Down

0 comments on commit e53628b

Please sign in to comment.