Skip to content

Commit

Permalink
Move navigator message listener registration to be synchronously atta…
Browse files Browse the repository at this point in the history
…ched (#28340)

to silence Chrome warning

Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
  • Loading branch information
t3chguy authored Nov 5, 2024
1 parent d7d96b6 commit c9d9c42
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/vector/platform/WebPlatform.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down

0 comments on commit c9d9c42

Please sign in to comment.