Skip to content

Commit

Permalink
fix: register serviceworker on / (#511)
Browse files Browse the repository at this point in the history
Did not work on two level deep links
  • Loading branch information
dni authored Mar 19, 2024
1 parent e0eacf6 commit 11bb6f9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ import "./utils/patches";

if ("serviceWorker" in navigator) {
navigator.serviceWorker
.register("./service-worker.js", { scope: "./" })
.register("/service-worker.js", { scope: "/" })
.then((reg) => {
log.info(`Registration succeeded. Scope is ${reg.scope}`);
});
Expand Down

0 comments on commit 11bb6f9

Please sign in to comment.