From ecc8f0e09a12577040e8da67a9748abcfb805e68 Mon Sep 17 00:00:00 2001 From: EduardZaydler <117674342+EduardZaydler@users.noreply.github.com> Date: Tue, 22 Oct 2024 10:54:15 +0700 Subject: [PATCH] removed update timeout --- src/serviceWorkerRegistration.ts | 8 -------- 1 file changed, 8 deletions(-) diff --git a/src/serviceWorkerRegistration.ts b/src/serviceWorkerRegistration.ts index 24b3090a..7f77bb49 100644 --- a/src/serviceWorkerRegistration.ts +++ b/src/serviceWorkerRegistration.ts @@ -4,14 +4,6 @@ export function register(onUpdate: () => void) { try { const registration = await navigator.serviceWorker.register("/service-worker.js"); - setInterval(async () => { - try { - await registration.update(); - } catch (error) { - console.error("Error updating service worker:", error); - } - }, 1000 * 60); - registration.onupdatefound = () => { const installingWorker = registration.installing; if (installingWorker) {