Parcourir la source

fix(pwa) fix PWA worker script origin

Looks like the base it's still applied, so use a full URL.
master
Saúl Ibarra Corretgé il y a 5 ans
Parent
révision
348c6416e5
1 fichiers modifiés avec 1 ajouts et 1 suppressions
  1. 1
    1
      index.html

+ 1
- 1
index.html Voir le fichier

@@ -25,7 +25,7 @@
25 25
 
26 26
             if (shouldRegisterWorker) {
27 27
                 navigator.serviceWorker
28
-                    .register('/pwa-worker.js')
28
+                    .register(window.location.origin + '/pwa-worker.js')
29 29
                     .then(reg => {
30 30
                         console.log('Service worker registered.', reg);
31 31
                     })

Chargement…
Annuler
Enregistrer