Skip to content

Commit

Permalink
Check DataCenterNode.HasChildren in DataCenterExtensions.DescendantsA…
Browse files Browse the repository at this point in the history
…t().
  • Loading branch information
alexrp committed Jan 9, 2024
1 parent 53856a0 commit 5955e39
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/formats/Data/DataCenterExtensions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -168,6 +168,9 @@ public static IEnumerable<DataCenterNode> DescendantsAt(this DataCenterNode node

void Evaluate(DataCenterNode node, ReadOnlySpan<string> path)
{
if (!node.HasChildren)
return;

var name = path[0];
var remaining = path[1..];

Expand Down

0 comments on commit 5955e39

Please sign in to comment.