Skip to content

Commit 638f021

Browse files
StephaneDelcroixrmarinho
authored andcommitted
[X] Traverse ListNode when finding DataType (#20742)
- fix #20633
1 parent 73a414f commit 638f021

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/Controls/src/Build.Tasks/SetPropertiesVisitor.cs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -402,7 +402,10 @@ static IEnumerable<Instruction> CompileBindingPath(ElementNode node, ILContext c
402402
{
403403
if (n.Properties.TryGetValue(XmlName.xDataType, out dataTypeNode))
404404
break;
405-
n = n.Parent as IElementNode;
405+
if (n.Parent is ListNode listNode)
406+
n = listNode.Parent as IElementNode;
407+
else
408+
n = n.Parent as IElementNode;
406409
}
407410

408411
if (dataTypeNode is null)

0 commit comments

Comments
 (0)