ui: Fix loading problems when themes arrived to late

This commit is contained in:
nemunaire 2021-09-01 01:42:56 +02:00
commit 941e1c16d5
5 changed files with 40 additions and 41 deletions

View file

@ -83,7 +83,7 @@
{#if $my && $my.team_id}
<NavItem>
{$my.score} {$my.score === 1 ? 'point' : 'points'}
{#if $teams[$my.team_id].rank}
{#if $teams && $teams[$my.team_id].rank}
&ndash; {$teams[$my.team_id].rank}<sup>e</sup> sur {Object.keys($teams).length}
{/if}
</NavItem>
@ -93,7 +93,7 @@
<Badge href="/register" color="warning">
Inscription
</Badge>
{:else if $my.team_id}
{:else if $my.team_id && $teams}
<Badge href="/edit" style="background-color: {$teams[$my.team_id].color} !important; color: {$teams[$my.team_id].color};">
<span class="teamname">{$my.name}</span>
</Badge>