Fix highscores if there is only 1 record

This commit is contained in:
slawkens 2023-07-19 11:57:26 +02:00
parent e49690b52b
commit df7c82c571
2 changed files with 1 additions and 2 deletions

View File

@ -311,7 +311,6 @@ if(config('highscores_balance'))
/** @var Twig\Environment $twig */
$twig->display('highscores.html.twig', [
'highscores' => $highscores,
'totalRows' => $i - 1,
'list' => $list,
'skill' => $skill,
'skillName' => ($skill == SKILL_FRAGS ? 'Frags' : ($skill == SKILL_BALANCE ? 'Balance' : getSkillName($skill))),

View File

@ -48,7 +48,7 @@
{% endif %}
</tr>
{% if totalRows < 1 %}
{% if highscores|length < 1 %}
<tr bgcolor="{{ config('darkborder') }}"><td colspan="100%">No records yet.</td></tr>
{% else %}
{% set row = 0 %}