Unregister service worker (#37)

* Unregister service worker

* Modify unregistration
main
Marian Steinbach 3 years ago committed by GitHub
parent 3f33f0dd02
commit e7631714f7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 9
      src/index.js

@ -59,10 +59,7 @@ ReactDOM.render(<App />, document.getElementById('root'));
// temporary: unregister old service eorker
if ('serviceWorker' in navigator) {
navigator.serviceWorker.getRegistrations()
.then((registrations) => {
for (let registration of registrations) {
registration.unregister();
}
});
navigator.serviceWorker.ready.then(registration => {
registration.unregister();
});
}

Loading…
Cancel
Save