fix issue with display server with no saved player history

This commit is contained in:
RaidMax 2021-08-31 08:44:15 -05:00
parent 5b11196b29
commit fa6524c3b1

View File

@ -37,7 +37,7 @@ namespace WebfrontCore.ViewComponents
{
var serverId = server.GetIdForServer().Result;
var clientHistory = _serverDataViewer.ClientHistoryAsync(_appConfig.MaxClientHistoryTime,
CancellationToken.None).Result
CancellationToken.None).Result?
.FirstOrDefault(history => history.ServerId == serverId) ??
new ClientHistoryInfo
{