@@ -47,7 +47,8 @@ function registerValidSW(swUrl) {
4747 navigator . serviceWorker
4848 . register ( swUrl )
4949 . then ( ( registration ) => {
50- registration . onupdatefound = ( ) => { // eslint-disable-line no-param-reassign
50+ // eslint-disable-next-line no-param-reassign
51+ registration . onupdatefound = ( ) => {
5152 const installingWorker = registration . installing ;
5253 installingWorker . onstatechange = ( ) => {
5354 if ( installingWorker . state === 'installed' ) {
@@ -56,18 +57,21 @@ function registerValidSW(swUrl) {
5657 // the fresh content will have been added to the cache.
5758 // It's the perfect time to display a "New content is
5859 // available; please refresh." message in your web app.
60+ // eslint-disable-next-line no-console
5961 console . log ( 'New content is available; please refresh.' ) ;
6062 } else {
6163 // At this point, everything has been precached.
6264 // It's the perfect time to display a
6365 // "Content is cached for offline use." message.
66+ // eslint-disable-next-line no-console
6467 console . log ( 'Content is cached for offline use.' ) ;
6568 }
6669 }
6770 } ;
6871 } ;
6972 } )
7073 . catch ( ( error ) => {
74+ // eslint-disable-next-line no-console
7175 console . error ( 'Error during service worker registration:' , error ) ;
7276 } ) ;
7377}
@@ -93,6 +97,7 @@ function checkValidServiceWorker(swUrl) {
9397 }
9498 } )
9599 . catch ( ( ) => {
100+ // eslint-disable-next-line no-console
96101 console . log (
97102 'No internet connection found. App is running in offline mode.'
98103 ) ;
0 commit comments