From fe64dc0e17611e0d194d3a1b3470f221a4407c94 Mon Sep 17 00:00:00 2001 From: Joscha Metze Date: Tue, 10 Dec 2024 10:28:54 +0100 Subject: [PATCH] Add empty string case for lenient gas --- .../LenientConverters/LenientGeraetemerkmalGasConverter.cs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/BO4E/meta/LenientConverters/LenientGeraetemerkmalGasConverter.cs b/BO4E/meta/LenientConverters/LenientGeraetemerkmalGasConverter.cs index 78144af7..7d601f8b 100644 --- a/BO4E/meta/LenientConverters/LenientGeraetemerkmalGasConverter.cs +++ b/BO4E/meta/LenientConverters/LenientGeraetemerkmalGasConverter.cs @@ -41,7 +41,10 @@ JsonSerializer serializer rawValue = reader.Value?.ToString(); break; } - + if (string.IsNullOrEmpty(rawValue)) + { + return null; + } try { return Enums.Parse(rawValue);