Skip to content

Commit

Permalink
fix(workbox): unregister only to avoid loop
Browse files Browse the repository at this point in the history
  • Loading branch information
pi0 committed Aug 14, 2020
1 parent 3e175f9 commit 44c5cd3
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/workbox/templates/workbox.unregister.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
if ('serviceWorker' in navigator) {
navigator.serviceWorker.getRegistrations().then((registrations) => {
for (const registration of registrations) {
// Force update service worker for self-unregister
registration.update()
console.info('[pwa] [workbox] Unregistering service worker:', registration)
registration.unregister()
}
})
}
Expand Down

0 comments on commit 44c5cd3

Please sign in to comment.