Make data nullable

This commit is contained in:
Andrei Zavatski
2020-03-09 19:42:35 +03:00
parent 432c52bf27
commit 06855c09c7
2 changed files with 6 additions and 14 deletions

View File

@ -42,13 +42,7 @@ namespace osu.Game.Overlays.Profile.Header.Components
{
int[] userRanks = statistics?.RankHistory?.Data;
if (userRanks == null)
{
Data = null;
return;
}
Data = userRanks.Select((x, index) => new KeyValuePair<int, int>(index, x)).Where(x => x.Value != 0).ToArray();
Data = userRanks?.Select((x, index) => new KeyValuePair<int, int>(index, x)).Where(x => x.Value != 0).ToArray();
}
protected override float GetDataPointHeight(int rank) => -MathF.Log(rank);