Browse Source

emergency fix

dev
thuhole 5 years ago
parent
commit
789e12c0f1
  1. 2
      src/infrastructure
  2. 12
      src/registerServiceWorker.js

2
src/infrastructure

@ -1 +1 @@
Subproject commit 211325e16075ab93c25582fdf6cc81136fc859a4
Subproject commit f8d3a5301358293f91b916cb3bc298b9a2f5fa05

12
src/registerServiceWorker.js

@ -22,12 +22,12 @@ export default function register() {
if (process.env.NODE_ENV === 'production' && 'serviceWorker' in navigator) {
// The URL constructor is available in all browsers that support SW.
// const publicUrl = new URL(process.env.PUBLIC_URL, window.location);
// if (publicUrl.origin !== window.location.origin) {
// // Our service worker won't work if PUBLIC_URL is on a different origin
// // from what our page is served on. This might happen if a CDN is used to
// // serve assets; see https://github.com/facebookincubator/create-react-app/issues/2374
// return;
// }
if (publicUrl.origin !== window.location.origin) {
// Our service worker won't work if PUBLIC_URL is on a different origin
// from what our page is served on. This might happen if a CDN is used to
// serve assets; see https://github.com/facebookincubator/create-react-app/issues/2374
return;
}
window.addEventListener('load', () => {
const swUrl = `${process.env.PUBLIC_URL}/service-worker.js`;

Loading…
Cancel
Save