debug: log new sw

This commit is contained in:
Ayo Ayco 2024-08-18 10:54:49 +02:00
parent bda88ca138
commit 10dc28a76f

View file

@ -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') {