Skip to content

Commit 759787a

Browse files
Confused...
1 parent 5aa6e0d commit 759787a

File tree

1 file changed

+8
-12
lines changed

1 file changed

+8
-12
lines changed

src/simulator.ts

+8-12
Original file line numberDiff line numberDiff line change
@@ -18,18 +18,14 @@ declare global {
1818
function initServiceWorker() {
1919
if ("serviceWorker" in navigator) {
2020
window.addEventListener("load", () => {
21-
navigator.serviceWorker
22-
// TODO: We'll need some bundler to get access to env vars here...
23-
// Hardcoding the review branch for testing purposes for now.
24-
.register("service-worker/sw.js", { scope: "/" })
25-
.then(
26-
function (_registration) {
27-
console.log("Simulator ServiceWorker registration successful");
28-
},
29-
function (err) {
30-
console.log("Simulator ServiceWorker registration failed: ", err);
31-
}
32-
);
21+
navigator.serviceWorker.register("/sw.js", { scope: "/" }).then(
22+
function (_registration) {
23+
console.log("Simulator ServiceWorker registration successful");
24+
},
25+
function (err) {
26+
console.log("Simulator ServiceWorker registration failed: ", err);
27+
}
28+
);
3329
});
3430
}
3531
}

0 commit comments

Comments
 (0)