From 27f8e1c7b64ada1267b1baf71c849d550399bb41 Mon Sep 17 00:00:00 2001 From: Mike Fix Date: Mon, 8 Apr 2019 21:49:46 -0700 Subject: [PATCH] simplify sw unregister --- pages/index.js | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/pages/index.js b/pages/index.js index 0762e57..45551b8 100644 --- a/pages/index.js +++ b/pages/index.js @@ -46,13 +46,7 @@ class Index extends React.Component { function onReset() { clearSettings() - if (window.navigator && navigator.serviceWorker) { - navigator.serviceWorker.getRegistrations().then(registrations => { - for (let registration of registrations) { - registration.unregister() - } - }) - } + unregister() } export default withRouter(Index)