1
0
mirror of https://github.com/ppy/osu.git synced 2024-11-11 21:47:25 +08:00

Add more consistency to data null checks

This commit is contained in:
Andrei Zavatski 2020-03-10 00:19:28 +03:00
parent d6adc06f6e
commit f6461dc5f8

View File

@ -88,7 +88,7 @@ namespace osu.Game.Overlays.Profile
private void redrawGraph()
{
if (!data?.Any() ?? true)
if (!(data?.Length > 1))
{
HideGraph();
return;
@ -111,7 +111,7 @@ namespace osu.Game.Overlays.Profile
{
get
{
if (!data?.Any() ?? true)
if (!(data?.Length > 1))
return null;
var (key, value) = data[dataIndex];