diff --git a/src/vector/platform/WebPlatform.ts b/src/vector/platform/WebPlatform.ts index 53ff14d82f4..0bbc7a0a5a3 100644 --- a/src/vector/platform/WebPlatform.ts +++ b/src/vector/platform/WebPlatform.ts @@ -54,8 +54,8 @@ export default class WebPlatform extends VectorBasePlatform { return; } - await registration.update(); navigator.serviceWorker.addEventListener("message", this.onServiceWorkerPostMessage.bind(this)); + await registration.update(); } private onServiceWorkerPostMessage(event: MessageEvent): void {