display "--" for no zscore

This commit is contained in:
RaidMax 2022-01-24 11:26:56 -06:00
parent 8bd0337168
commit 11d2b0da90

View File

@ -1,4 +1,5 @@
@using WebfrontCore.ViewModels @using WebfrontCore.ViewModels
@using System.Globalization
@model WebfrontCore.ViewModels.ScoreboardInfo @model WebfrontCore.ViewModels.ScoreboardInfo
@{ @{
Layout = null; Layout = null;
@ -48,7 +49,7 @@
<td>@(client.Deaths ?? 0)</td> <td>@(client.Deaths ?? 0)</td>
<td>@Math.Round(client.Kdr ?? 0, 2)</td> <td>@Math.Round(client.Kdr ?? 0, 2)</td>
<td>@Math.Round(client.ScorePerMinute ?? 0)</td> <td>@Math.Round(client.ScorePerMinute ?? 0)</td>
<td>@Math.Round(client.ZScore ?? 0, 2)</td> <td>@(client.ZScore == null ? "--" : Math.Round(client.ZScore.Value, 2).ToString(CultureInfo.CurrentCulture))</td>
<td class="text-right">@client.Ping</td> <td class="text-right">@client.Ping</td>
</tr> </tr>
} }