CB-3405 fix: skip update request on service worker first installation (#1629)

This commit is contained in:
Alexey
2023-04-24 20:46:49 +03:00
committed by GitHub
parent 05ab5b4512
commit a2a612ebf6
@@ -49,7 +49,11 @@ export class ServiceWorkerService {
private registerSkipWaitingPrompt(workbox: Workbox): void {
workbox.addEventListener('controlling', async () => {
workbox.addEventListener('controlling', async event => {
if (!event.isUpdate) {
return;
}
const updateAccepted = await this.requestUpdate();
if (updateAccepted) {