1
0
mirror of https://github.com/ppy/osu.git synced 2024-12-14 19:22:54 +08:00

Fix some score imports failing due to null string attempted to be parsed as json

This commit is contained in:
Dean Herbert 2022-01-26 22:46:29 +09:00
parent cf9ee43b17
commit 378173cc66

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]