diff --git a/src/main.ts b/src/main.ts index 6f89357..e7526ad 100644 --- a/src/main.ts +++ b/src/main.ts @@ -24,12 +24,9 @@ function checkIsSafari (): boolean { window.isSafari = checkIsSafari() -const updateSW = registerSW({ - onNeedRefresh () { - updateSW(true).catch(e => { - console.error('Failed to update service worker:', e) - }) - } +const updateSW = registerSW() +updateSW(true).catch(e => { + console.error('Failed to update service worker:', e) }) window.onload = async () => { await updateSW() }