diff --git a/pages/index.js b/pages/index.js index 45551b8..0762e57 100644 --- a/pages/index.js +++ b/pages/index.js @@ -46,7 +46,13 @@ class Index extends React.Component { function onReset() { clearSettings() - unregister() + if (window.navigator && navigator.serviceWorker) { + navigator.serviceWorker.getRegistrations().then(registrations => { + for (let registration of registrations) { + registration.unregister() + } + }) + } } export default withRouter(Index)