From 6982ba8ac50c35c4d13677abc1f422645e2825c5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=A9=AC=E6=A2=93=E5=BD=AD?= Date: Mon, 12 Oct 2026 10:19:20 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E8=BD=AC=E7=A7=BB=E9=97=AE?= =?UTF-8?q?=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- YD_Event.Application/Scoring/ScoreDisplayService.cs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/YD_Event.Application/Scoring/ScoreDisplayService.cs b/YD_Event.Application/Scoring/ScoreDisplayService.cs index 09eb41e..ae23ef0 100644 --- a/YD_Event.Application/Scoring/ScoreDisplayService.cs +++ b/YD_Event.Application/Scoring/ScoreDisplayService.cs @@ -25,7 +25,10 @@ public static class ScoreDisplayService if (string.IsNullOrWhiteSpace(calculationJson)) return null; try { - return JObject.Parse(calculationJson)["factors"]?["m"]?.Value(); + var root = JObject.Parse(calculationJson); + return root["factors"] is JObject factors + ? factors["m"]?.Value() + : null; } catch (Exception ex) when (ex is JsonException or FormatException or InvalidCastException or OverflowException) {