From 7653c0781c3658602a6da67259f5d3dd061d06f3 Mon Sep 17 00:00:00 2001 From: David DiMaria Date: Tue, 5 Nov 2024 12:40:35 -0700 Subject: [PATCH] Move JWT initialization --- .../src/app/web-workers/quadraticCore/worker/core.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/quadratic-client/src/app/web-workers/quadraticCore/worker/core.ts b/quadratic-client/src/app/web-workers/quadraticCore/worker/core.ts index 5b3862b5b1..29b791e136 100644 --- a/quadratic-client/src/app/web-workers/quadraticCore/worker/core.ts +++ b/quadratic-client/src/app/web-workers/quadraticCore/worker/core.ts @@ -60,10 +60,10 @@ class Core { private renderQueue: Function[] = []; private async loadGridFile(file: string, addToken: boolean): Promise { - const jwt = await coreClient.getJwt(); let requestInit = {}; if (addToken) { + const jwt = await coreClient.getJwt(); requestInit = { headers: { Authorization: `Bearer ${jwt}` } }; }