Skip to content
This repository was archived by the owner on Feb 12, 2025. It is now read-only.

Commit 060cc17

Browse files
obonesRubenWillems
authored andcommitted
We need to know if the root item has dynamic values so we must stop a bit differently.
1 parent 6eace86 commit 060cc17

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

project/core/tasks/DynamicValueUtility.cs

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -442,7 +442,7 @@ public static XmlNode ConvertXmlToDynamicValues(NetReflectorTypeTable typeTable,
442442
var previousNode = currentNode;
443443
var lastName = string.Empty;
444444
bool hasDynamicValues = false;
445-
while ((currentNode != inputNode) && (currentNode != null))
445+
while ((currentNode != null) && (currentNode.NodeType != XmlNodeType.Document))
446446
{
447447
var nodeName = currentNode.Name;
448448

@@ -454,6 +454,11 @@ public static XmlNode ConvertXmlToDynamicValues(NetReflectorTypeTable typeTable,
454454
if (hasDynamicValues)
455455
break;
456456
}
457+
458+
// we don't want to take into account the input node, but we need to know if it has
459+
// dynamic values, hence the break here and not in the while loop
460+
if (currentNode == inputNode)
461+
break;
457462

458463
// Check if we are dealing with an array
459464
if (inputMembers.ContainsKey(nodeName) && inputMembers[nodeName].ReflectorMember.MemberType.IsArray)

0 commit comments

Comments
 (0)