From 18886f5d2ebdd2061e390854920df1d1c718aba0 Mon Sep 17 00:00:00 2001 From: Dean Herbert Date: Wed, 19 Jan 2022 14:28:16 +0900 Subject: [PATCH] Use empty string instead of empty array for `ModsJson` when no mods are present Not really correct, but this is how most scores have been stored until now so let's do this for consistency. --- osu.Game/Scoring/ScoreInfo.cs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/osu.Game/Scoring/ScoreInfo.cs b/osu.Game/Scoring/ScoreInfo.cs index fe99d5d9a8..cfc37e956d 100644 --- a/osu.Game/Scoring/ScoreInfo.cs +++ b/osu.Game/Scoring/ScoreInfo.cs @@ -234,7 +234,9 @@ namespace osu.Game.Scoring private void updateModsJson() { - ModsJson = JsonConvert.SerializeObject(APIMods); + ModsJson = APIMods.Length > 0 + ? JsonConvert.SerializeObject(APIMods) + : string.Empty; } public IEnumerable GetStatisticsForDisplay()