From c18feb07481af6152c445327105876760ed95dd0 Mon Sep 17 00:00:00 2001 From: Miodec Date: Sun, 22 Dec 2024 00:31:51 +0100 Subject: chore: add additional isAuthenticated check in case user logs out during the request --- frontend/src/ts/db.ts | 3 +++ 1 file changed, 3 insertions(+) diff --git a/frontend/src/ts/db.ts b/frontend/src/ts/db.ts index ff437e07f..8accd57c2 100644 --- a/frontend/src/ts/db.ts +++ b/frontend/src/ts/db.ts @@ -372,6 +372,9 @@ export async function getUserResults(offset?: number): Promise { return false; } + //another check in case user logs out while waiting for response + if (!isAuthenticated()) return false; + const results: SnapshotResult[] = response.body.data.map((result) => { if (result.bailedOut === undefined) result.bailedOut = false; if (result.blindMode === undefined) result.blindMode = false; -- cgit v1.2.3