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
1 changed files with 1 additions and 1 deletions

View File

@ -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]