Skip to content

Commit

Permalink
Fix DataCenterExtensions.DescendantsAt() comparing the wrong node name.
Browse files Browse the repository at this point in the history
Closes #108.
  • Loading branch information
alexrp committed Jan 9, 2024
1 parent f389b4e commit 19672c8
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/formats/Data/DataCenterExtensions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -174,10 +174,10 @@ void Evaluate(DataCenterNode node, ReadOnlySpan<string> path)

foreach (var child in node.Children)
{
if (node.Name != name)
if (child.Name != name)
continue;

if (path.Length == 1)
if (remaining is [])
results.Add(child);
else
Evaluate(child, remaining);
Expand Down

0 comments on commit 19672c8

Please sign in to comment.