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) {