mirror of https://github.com/ppy/osu
Fix some score imports failing due to null string attempted to be parsed as json
This commit is contained in:
parent
cf9ee43b17
commit
378173cc66
|
@ -105,7 +105,7 @@ public APIMod[] APIMods
|
|||
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]
|
||||
|
|
Loading…
Reference in New Issue