Skip to content

Commit

Permalink
Remove an useless negation in registerServiceWorker.js
Browse files Browse the repository at this point in the history
  • Loading branch information
dunglas authored Sep 18, 2017
1 parent 2cff8db commit 8eeba56
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions packages/react-scripts/template/src/registerServiceWorker.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,12 +32,12 @@ export default function register() {
window.addEventListener('load', () => {
const swUrl = `${process.env.PUBLIC_URL}/service-worker.js`;

if (!isLocalhost) {
// Is not local host. Just register service worker
registerValidSW(swUrl);
} else {
if (isLocalhost) {
// This is running on localhost. Lets check if a service worker still exists or not.
checkValidServiceWorker(swUrl);
} else {
// Is not local host. Just register service worker
registerValidSW(swUrl);
}
});
}
Expand Down

0 comments on commit 8eeba56

Please sign in to comment.