Revert "simplify sw unregister"

This reverts commit 27f8e1c7b6.
main
Mike Fix 6 years ago
parent 27f8e1c7b6
commit abbb9d99d4

@ -46,7 +46,13 @@ class Index extends React.Component {
function onReset() { function onReset() {
clearSettings() clearSettings()
unregister() if (window.navigator && navigator.serviceWorker) {
navigator.serviceWorker.getRegistrations().then(registrations => {
for (let registration of registrations) {
registration.unregister()
}
})
}
} }
export default withRouter(Index) export default withRouter(Index)

Loading…
Cancel
Save