From 31b7e71a1cbebd4bc5e94d4bec7245e8912d9a8e Mon Sep 17 00:00:00 2001 From: z0ccc Date: Wed, 29 Sep 2021 16:35:31 -0400 Subject: [PATCH] Removed PUBLIC_URL in index --- frontend/public/index.html | 2 +- frontend/src/serviceWorker.js | 12 ++++++------ 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/frontend/public/index.html b/frontend/public/index.html index 90f623f..5ba10c9 100644 --- a/frontend/public/index.html +++ b/frontend/public/index.html @@ -17,7 +17,7 @@ - + { + .then((registration) => { registration.onupdatefound = () => { const installingWorker = registration.installing; if (installingWorker == null) { @@ -94,7 +94,7 @@ function registerValidSW(swUrl, config) { }; }; }) - .catch(error => { + .catch((error) => { console.error('Error during service worker registration:', error); }); } @@ -104,7 +104,7 @@ function checkValidServiceWorker(swUrl, config) { fetch(swUrl, { headers: { 'Service-Worker': 'script' }, }) - .then(response => { + .then((response) => { // Ensure service worker exists, and that we really are getting a JS file. const contentType = response.headers.get('content-type'); if ( @@ -112,7 +112,7 @@ function checkValidServiceWorker(swUrl, config) { (contentType != null && contentType.indexOf('javascript') === -1) ) { // No service worker found. Probably a different app. Reload the page. - navigator.serviceWorker.ready.then(registration => { + navigator.serviceWorker.ready.then((registration) => { registration.unregister().then(() => { window.location.reload(); }); @@ -132,10 +132,10 @@ function checkValidServiceWorker(swUrl, config) { export function unregister() { if ('serviceWorker' in navigator) { navigator.serviceWorker.ready - .then(registration => { + .then((registration) => { registration.unregister(); }) - .catch(error => { + .catch((error) => { console.error(error.message); }); }