Skip to content

Commit de74c79

Browse files
author
Matthew Grill
committed
No more console.log
1 parent 0798617 commit de74c79

File tree

1 file changed

+3
-16
lines changed

1 file changed

+3
-16
lines changed

src/registerServiceWorker.js

Lines changed: 3 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -31,20 +31,16 @@ function registerValidSW(swUrl) {
3131
// the fresh content will have been added to the cache.
3232
// It's the perfect time to display a "New content is
3333
// available; please refresh." message in your web app.
34-
console.log('New content is available; please refresh.');
3534
} else {
3635
// At this point, everything has been precached.
3736
// It's the perfect time to display a
3837
// "Content is cached for offline use." message.
39-
console.log('Content is cached for offline use.');
4038
}
4139
}
4240
};
4341
};
4442
})
45-
.catch(error => {
46-
console.error('Error during service worker registration:', error);
47-
});
43+
.catch(() => {});
4844
}
4945

5046
function checkValidServiceWorker(swUrl) {
@@ -67,11 +63,7 @@ function checkValidServiceWorker(swUrl) {
6763
registerValidSW(swUrl);
6864
}
6965
})
70-
.catch(() => {
71-
console.log(
72-
'No internet connection found. App is running in offline mode.',
73-
);
74-
});
66+
.catch(() => {});
7567
}
7668

7769
export default function register() {
@@ -94,12 +86,7 @@ export default function register() {
9486

9587
// Add some additional logging to localhost, pointing developers to the
9688
// 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(() => {});
10390
} else {
10491
// Is not local host. Just register service worker
10592
registerValidSW(swUrl);

0 commit comments

Comments
 (0)