Skip to content

Commit

Permalink
Actually fix serviceworker
Browse files Browse the repository at this point in the history
  • Loading branch information
russss committed Mar 4, 2024
1 parent 38a7d63 commit 42dbcf5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion web/src/sw.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ register('maps', new StaleWhileRevalidate())

try {
// Only catch requests to the root URL (a regex doesn't do this).
registerRoute(({ url }) => url.pathname.startsWith('/'), createHandlerBoundToURL('index.html'))
registerRoute(({ url }) => url.pathname == '/', createHandlerBoundToURL('index.html'))
} catch (e) {
// This fails in dev as index.html is not in the manifest.
}
Expand Down

0 comments on commit 42dbcf5

Please sign in to comment.