From 4c32a2e6d9ea7e61a3b5ae38ade1e43b609a20bc Mon Sep 17 00:00:00 2001 From: Francisco Salgueiro Date: Sun, 17 Mar 2024 10:55:47 +0000 Subject: [PATCH] fix game downloads --- src/components/home/AccountCard.tsx | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/components/home/AccountCard.tsx b/src/components/home/AccountCard.tsx index 2d33df50..b343d678 100644 --- a/src/components/home/AccountCard.tsx +++ b/src/components/home/AccountCard.tsx @@ -195,9 +195,10 @@ export function AccountCard({ { - if (!database) return; setLoading(true); - const lastGameDate = await getLastGameDate({ database }); + const lastGameDate = database + ? await getLastGameDate({ database }) + : null; if (type === "lichess") { await downloadLichess( title,