From c644e44665320c982ca816f98ed2fcebc4d5285d Mon Sep 17 00:00:00 2001 From: Frederic Henrichs Date: Tue, 24 Sep 2024 08:31:30 +0200 Subject: [PATCH] frontend/worker: wait for libsodium to be ready. Maybe a fix for #90 --- frontend/src/worker.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/frontend/src/worker.ts b/frontend/src/worker.ts index 936541a..df7901c 100644 --- a/frontend/src/worker.ts +++ b/frontend/src/worker.ts @@ -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");