Skip to content

Commit

Permalink
Remove an useless negation in registerServiceWorker.js (#3150)
Browse files Browse the repository at this point in the history
  • Loading branch information
dunglas authored and gaearon committed Oct 28, 2017
1 parent 70e0c08 commit 15d8e53
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 15d8e53

Please sign in to comment.