1
0
mirror of https://github.com/ppy/osu.git synced 2026-06-05 17:54:14 +08:00

Merge pull request #16630 from peppy/fix-null-mod-json-parse-fail

Fix some score imports failing due to null string attempted to be parsed as json
This commit is contained in:
Dan Balasescu
2022-01-26 23:15:23 +09:00
committed by GitHub
Unverified
+1 -1
View File
@@ -105,7 +105,7 @@ namespace osu.Game.Scoring
public string ModsJson
{
get => JsonConvert.SerializeObject(APIMods);
set => APIMods = JsonConvert.DeserializeObject<APIMod[]>(value);
set => APIMods = !string.IsNullOrEmpty(value) ? JsonConvert.DeserializeObject<APIMod[]>(value) : Array.Empty<APIMod>();
}
[NotMapped]