@@ -31,20 +31,16 @@ function registerValidSW(swUrl) {
31
31
// the fresh content will have been added to the cache.
32
32
// It's the perfect time to display a "New content is
33
33
// available; please refresh." message in your web app.
34
- console . log ( 'New content is available; please refresh.' ) ;
35
34
} else {
36
35
// At this point, everything has been precached.
37
36
// It's the perfect time to display a
38
37
// "Content is cached for offline use." message.
39
- console . log ( 'Content is cached for offline use.' ) ;
40
38
}
41
39
}
42
40
} ;
43
41
} ;
44
42
} )
45
- . catch ( error => {
46
- console . error ( 'Error during service worker registration:' , error ) ;
47
- } ) ;
43
+ . catch ( ( ) => { } ) ;
48
44
}
49
45
50
46
function checkValidServiceWorker ( swUrl ) {
@@ -67,11 +63,7 @@ function checkValidServiceWorker(swUrl) {
67
63
registerValidSW ( swUrl ) ;
68
64
}
69
65
} )
70
- . catch ( ( ) => {
71
- console . log (
72
- 'No internet connection found. App is running in offline mode.' ,
73
- ) ;
74
- } ) ;
66
+ . catch ( ( ) => { } ) ;
75
67
}
76
68
77
69
export default function register ( ) {
@@ -94,12 +86,7 @@ export default function register() {
94
86
95
87
// Add some additional logging to localhost, pointing developers to the
96
88
// service worker/PWA documentation.
97
- navigator . serviceWorker . ready . then ( ( ) => {
98
- console . log (
99
- 'This web app is being served cache-first by a service ' +
100
- 'worker. To learn more, visit https://goo.gl/SC7cgQ' ,
101
- ) ;
102
- } ) ;
89
+ navigator . serviceWorker . ready . then ( ( ) => { } ) ;
103
90
} else {
104
91
// Is not local host. Just register service worker
105
92
registerValidSW ( swUrl ) ;
0 commit comments