don't show the update dialog if we open the app for the first time

and don't have a service worker yet
This commit is contained in:
Bruno Windels 2021-03-18 19:58:50 +01:00
parent 017d3818eb
commit ffdec16076

View File

@ -42,7 +42,8 @@ export class ServiceWorkerHandler {
this._currentController = navigator.serviceWorker.controller;
this._registration.addEventListener("updatefound", this);
this._registrationPromise = null;
if (this._registration.waiting) {
// do we have a new service worker waiting to activate?
if (this._registration.waiting && this._registration.active) {
this._proposeUpdate();
}
console.log("Service Worker registered");