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}` } }; }