From 5cb0c3fa1fe6f4e5c0d23952d5c53955611647c7 Mon Sep 17 00:00:00 2001 From: vvandenb Date: Mon, 13 Mar 2023 19:04:49 +0100 Subject: [PATCH] * MatchHistory no usernames protection --- front/volume/src/components/MatchHistory.svelte | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/front/volume/src/components/MatchHistory.svelte b/front/volume/src/components/MatchHistory.svelte index e612462..7e0f541 100644 --- a/front/volume/src/components/MatchHistory.svelte +++ b/front/volume/src/components/MatchHistory.svelte @@ -71,11 +71,13 @@ {#each data as match} {displayDate(match.date.toString())} - {match.players[0].username}
{match.players[1] - .username} - {match.score[0]}
{match.score[1]} + {#if match?.players[0]?.username && match?.players[1]?.username} + {match.players[0].username}
{match.players[1] + .username} + {match.score[0]}
{match.score[1]} + {/if} {/each}