Fix service worker to load from absolute url.

This commit is contained in:
Dillon Kearns 2019-08-14 17:55:41 -07:00
parent b58fb84f4a
commit 5679d642b4

View File

@ -6,7 +6,7 @@
<script>
if ("serviceWorker" in navigator) {
window.addEventListener("load", () => {
navigator.serviceWorker.register("./service-worker.js");
navigator.serviceWorker.register("/service-worker.js");
});
} else {
console.log("No service worker registered.");