Explorar el Código

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é hace 5 años
padre
commit
348c6416e5
Se han modificado 1 ficheros con 1 adiciones y 1 borrados
  1. 1
    1
      index.html

+ 1
- 1
index.html Ver fichero

@@ -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
                     })

Loading…
Cancelar
Guardar