From 10dc28a76fd2217179b72e1b70d2f14443dc6169 Mon Sep 17 00:00:00 2001 From: ayoayco Date: Sun, 18 Aug 2024 10:54:49 +0200 Subject: [PATCH] debug: log new sw --- src/layouts/Layout.astro | 1 + 1 file changed, 1 insertion(+) diff --git a/src/layouts/Layout.astro b/src/layouts/Layout.astro index 989b7ef..13212a6 100644 --- a/src/layouts/Layout.astro +++ b/src/layouts/Layout.astro @@ -60,6 +60,7 @@ const appTitle = article?.title ? `${article.title} | Cozy` : 'Cozy'; // when the controllerchange event has fired, we get the new service worker const newSw = (await navigator.serviceWorker.getRegistration())?.active?.state; + console.log('>>> new sw', newSw); // if there was already an old activated service worker, and a new activating service worker, do the reload if(oldSw === 'activated' && newSw === 'activating') {