From 829197e17a43d798eb49bd614d073faa24a27dbf Mon Sep 17 00:00:00 2001 From: Martin Berka Date: Mon, 2 Oct 2023 19:13:47 +0200 Subject: [PATCH] =?UTF-8?q?Oprava=20v=C3=BDchoz=C3=ADch=20dat=20pro=20hlas?= =?UTF-8?q?ov=C3=A1n=C3=AD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- server/src/voting.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/server/src/voting.ts b/server/src/voting.ts index dd91e3a..f34259e 100644 --- a/server/src/voting.ts +++ b/server/src/voting.ts @@ -16,7 +16,7 @@ const STORAGE_KEY = 'voting'; */ export async function getUserVotes(login: string) { const data: VotingData = await storage.getData(STORAGE_KEY); - return data?.[login]; + return data?.[login] || []; } /**