From 9fad5b3b29fee4d791b9969ea546ed2377e18fb5 Mon Sep 17 00:00:00 2001 From: Bruno Windels Date: Mon, 14 Sep 2020 14:07:20 +0200 Subject: [PATCH] only load olm once --- src/main.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/main.js b/src/main.js index 8a7cbf0d..97c0b812 100644 --- a/src/main.js +++ b/src/main.js @@ -105,6 +105,7 @@ export async function main(container, paths) { const sessionInfoStorage = new SessionInfoStorage("brawl_sessions_v1"); const storageFactory = new StorageFactory(); + const olmPromise = loadOlm(paths.olm); // if wasm is not supported, we'll want // to run some olm operations in a worker (mainly for IE11) let workerPromise; @@ -121,7 +122,7 @@ export async function main(container, paths) { sessionInfoStorage, request, clock, - olmPromise: loadOlm(paths.olm), + olmPromise, workerPromise, }); },