diff --git a/packages/create-freesewing-pattern/template/default/example/src/serviceWorker.js b/packages/create-freesewing-pattern/template/default/example/src/serviceWorker.js index 4fe923e7795..44e1b1b2f8c 100644 --- a/packages/create-freesewing-pattern/template/default/example/src/serviceWorker.js +++ b/packages/create-freesewing-pattern/template/default/example/src/serviceWorker.js @@ -53,7 +53,7 @@ export function register(config) { function registerValidSW(swUrl, config) { navigator.serviceWorker .register(swUrl) - .then((registration) => { + .then(registration => { registration.onupdatefound = () => { const installingWorker = registration.installing installingWorker.onstatechange = () => { @@ -84,7 +84,7 @@ function registerValidSW(swUrl, config) { } } }) - .catch((error) => { + .catch(error => { console.error('Error during service worker registration:', error) }) } @@ -92,14 +92,14 @@ function registerValidSW(swUrl, config) { function checkValidServiceWorker(swUrl, config) { // Check if the service worker can be found. If it can't reload the page. fetch(swUrl) - .then((response) => { + .then(response => { // Ensure service worker exists, and that we really are getting a JS file. if ( response.status === 404 || response.headers.get('content-type').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() }) @@ -116,7 +116,7 @@ function checkValidServiceWorker(swUrl, config) { export function unregister() { if ('serviceWorker' in navigator) { - navigator.serviceWorker.ready.then((registration) => { + navigator.serviceWorker.ready.then(registration => { registration.unregister() }) }