修复转移问题
This commit is contained in:
parent
42755c4a2a
commit
6982ba8ac5
@ -25,7 +25,10 @@ public static class ScoreDisplayService
|
||||
if (string.IsNullOrWhiteSpace(calculationJson)) return null;
|
||||
try
|
||||
{
|
||||
return JObject.Parse(calculationJson)["factors"]?["m"]?.Value<decimal?>();
|
||||
var root = JObject.Parse(calculationJson);
|
||||
return root["factors"] is JObject factors
|
||||
? factors["m"]?.Value<decimal?>()
|
||||
: null;
|
||||
}
|
||||
catch (Exception ex) when (ex is JsonException or FormatException or InvalidCastException or OverflowException)
|
||||
{
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user