Skip to content

Commit

Permalink
frontend/worker: wait for libsodium to be ready. Maybe a fix for #90
Browse files Browse the repository at this point in the history
  • Loading branch information
ffreddow committed Sep 24, 2024
1 parent 60bc6b3 commit c644e44
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions frontend/src/worker.ts
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,7 @@ self.addEventListener("message", async (e: MessageEvent) => {
break;

case MessageType.Setup:
await sodium.ready;
setup_data = data.data as SetupMessage;
await start_connection(setup_data);
self.postMessage("ready");
Expand Down

0 comments on commit c644e44

Please sign in to comment.