Skip to content

Commit 31b91e5

Browse files
authored
add logging to sw unregistration on error
1 parent f2a11d0 commit 31b91e5

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

index.html

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,9 +49,13 @@
4949
if (window.navigator.maxTouchPoints > 1) window.location.hash = '#dev' // show eruda
5050
// unregister all sw
5151
if (window.navigator.serviceWorker) {
52+
console.log('got worker')
5253
window.navigator.serviceWorker.getRegistrations().then(registrations => {
5354
registrations.forEach(registration => {
54-
registration.unregister()
55+
console.log('got registration')
56+
registration.unregister().then(() => {
57+
console.log('worker unregistered')
58+
})
5559
})
5660
})
5761
}

0 commit comments

Comments
 (0)