diff --git a/Lombiq.HelpfulExtensions/Extensions/CodeGeneration/CodeGenerationDisplayDriver.cs b/Lombiq.HelpfulExtensions/Extensions/CodeGeneration/CodeGenerationDisplayDriver.cs index bf330c36..6ba422ad 100644 --- a/Lombiq.HelpfulExtensions/Extensions/CodeGeneration/CodeGenerationDisplayDriver.cs +++ b/Lombiq.HelpfulExtensions/Extensions/CodeGeneration/CodeGenerationDisplayDriver.cs @@ -176,7 +176,9 @@ private string ConvertJsonObject(JsonObject jsonObject, int indentationDepth) { var braceIndentation = new string(' ', indentationDepth); var propertyIndentation = new string(' ', indentationDepth + IndentationDepth); - if (jsonObject["name"] is { } name && jsonObject["value"] is { } value) + var nameNode = jsonObject["name"]; + var valueNode = jsonObject["value"]; + if (nameNode is { } name && valueNode is { } value) { var objectCodeBuilder = new StringBuilder(); objectCodeBuilder.AppendLine(CultureInfo.InvariantCulture, $"{braceIndentation}new ListValueOption");