debug: log new sw
This commit is contained in:
parent
bda88ca138
commit
10dc28a76f
1 changed files with 1 additions and 0 deletions
|
@ -60,6 +60,7 @@ const appTitle = article?.title ? `${article.title} | Cozy` : 'Cozy';
|
||||||
|
|
||||||
// when the controllerchange event has fired, we get the new service worker
|
// when the controllerchange event has fired, we get the new service worker
|
||||||
const newSw = (await navigator.serviceWorker.getRegistration())?.active?.state;
|
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 there was already an old activated service worker, and a new activating service worker, do the reload
|
||||||
if(oldSw === 'activated' && newSw === 'activating') {
|
if(oldSw === 'activated' && newSw === 'activating') {
|
||||||
|
|
Loading…
Reference in a new issue