Skip to content

Commit

Permalink
fix game downloads
Browse files Browse the repository at this point in the history
  • Loading branch information
franciscoBSalgueiro committed Mar 17, 2024
1 parent ee65b9c commit 4c32a2e
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/components/home/AccountCard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -195,9 +195,10 @@ export function AccountCard({
<ActionIcon
disabled={loading}
onClick={async () => {
if (!database) return;
setLoading(true);
const lastGameDate = await getLastGameDate({ database });
const lastGameDate = database
? await getLastGameDate({ database })
: null;
if (type === "lichess") {
await downloadLichess(
title,
Expand Down

0 comments on commit 4c32a2e

Please sign in to comment.