Skip to content

Commit 763a51e

Browse files
author
dahall
committed
Removed 'preview' null conditional assignment
1 parent 0971acf commit 763a51e

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

CodeGen/Generator/VanaraAttributeGenerator.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -460,7 +460,8 @@ private static void BuildAddAsMethod(SourceProductionContext context, Compilatio
460460
var paramNode = tmpbuilder.docs?.SelectSingleNode($"//param[@name='{ps.Identifier.Text}']");
461461
var returnsNode = tmpbuilder.docs?.SelectSingleNode("//returns") ??
462462
tmpbuilder.docs?.DocumentElement?.AppendChild(tmpbuilder.docs?.CreateElement("returns")!);
463-
returnsNode?.InnerXml = paramNode?.InnerXml;
463+
if (returnsNode is not null)
464+
returnsNode.InnerXml = paramNode?.InnerXml;
464465
paramNode?.ParentNode?.RemoveChild(paramNode);
465466
}
466467
}

0 commit comments

Comments
 (0)