fix client history issue with empty database

This commit is contained in:
RaidMax 2021-09-10 11:27:46 -05:00
parent a4f0726b32
commit 54e39fabb1

View File

@ -50,7 +50,7 @@ namespace WebfrontCore.ViewComponents
{ {
counts = counts.Union(server.ClientHistory counts = counts.Union(server.ClientHistory
.Select(history => history.ToClientCountSnapshot()).Where(history => .Select(history => history.ToClientCountSnapshot()).Where(history =>
history.Time > clientHistory.ClientCounts.Last().Time)); history.Time > (clientHistory.ClientCounts.LastOrDefault()?.Time ?? DateTime.MinValue)));
} }
serverInfo.Add(new ServerInfo() serverInfo.Add(new ServerInfo()