You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Seems like addEventListener return is void. I'm currently using another method, that "handle" hard reload by rejecting promise.
privateresolveControllerReady(resolve,reject,count: number=0){count++;if(count>10){reject(`Controller still not ready after (${count}) attempts`);}else{if(navigator.serviceWorker.controller){console.info(`Controller ready after (${count}) attempt(s)`);resolve();}else{console.warn(`Controller is not ready yet ! waiting ... - (${count})`);returnsetTimeout(()=>{this.resolveControllerReady(resolve,reject,count);},2000)}}}
It seems that there is a small wait between when the .ready method is called and the serviceworker actually claims the client.
We should wait for the controller before firing ready:
The text was updated successfully, but these errors were encountered: