From 2de61c5928216dac87ef1b9cab8ff94fa08daec8 Mon Sep 17 00:00:00 2001 From: Bruno Windels Date: Wed, 24 Mar 2021 15:19:10 +0100 Subject: [PATCH] ask the new version to the new and not old service worker --- src/platform/web/dom/ServiceWorkerHandler.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/platform/web/dom/ServiceWorkerHandler.js b/src/platform/web/dom/ServiceWorkerHandler.js index 447b5dc8..cb105f0a 100644 --- a/src/platform/web/dom/ServiceWorkerHandler.js +++ b/src/platform/web/dom/ServiceWorkerHandler.js @@ -94,7 +94,7 @@ export class ServiceWorkerHandler { if (document.hidden) { return; } - const version = await this._sendAndWaitForReply("version"); + const version = await this._sendAndWaitForReply("version", null, this._registration.waiting); if (confirm(`Version ${version.version} (${version.buildHash}) is available. Reload to apply?`)) { // prevent any fetch requests from going to the service worker // from any client, so that it is not kept active