Skip to content

Commit

Permalink
Remove an useless negation in registerServiceWorker.js (facebook#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 540a145 commit 22120b1
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions 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 22120b1

Please sign in to comment.