We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 540a145 commit 22120b1Copy full SHA for 22120b1
template/src/registerServiceWorker.js
@@ -32,12 +32,12 @@ export default function register() {
32
window.addEventListener('load', () => {
33
const swUrl = `${process.env.PUBLIC_URL}/service-worker.js`;
34
35
- if (!isLocalhost) {
36
- // Is not local host. Just register service worker
37
- registerValidSW(swUrl);
38
- } else {
+ if (isLocalhost) {
39
// This is running on localhost. Lets check if a service worker still exists or not.
40
checkValidServiceWorker(swUrl);
+ } else {
+ // Is not local host. Just register service worker
+ registerValidSW(swUrl);
41
}
42
});
43
0 commit comments