From 3c3ed749955133b75d01e79b8d5f894e191a010a Mon Sep 17 00:00:00 2001 From: Arthur Jamet Date: Thu, 4 May 2023 13:02:08 +0100 Subject: [PATCH] Front: Song Lobby: Fallback if no previous score --- front/views/SongLobbyView.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/front/views/SongLobbyView.tsx b/front/views/SongLobbyView.tsx index c586679..019c034 100644 --- a/front/views/SongLobbyView.tsx +++ b/front/views/SongLobbyView.tsx @@ -59,13 +59,13 @@ const SongLobbyView = (props: RouteProps) => { - {scoresQuery.data!.sort()[0]?.score} + {scoresQuery.data!.sort()[0]?.score ?? 0} - {scoresQuery.data!.slice(-1)[0]!.score} + {scoresQuery.data!.slice(-1)[0]?.score ?? 0} {/* {songQuery.data!.description} */}