Skip to content
This repository was archived by the owner on Dec 5, 2024. It is now read-only.

Commit ae8fda9

Browse files
committed
Our node list is not a tree, fix duplicate recursiveness
1 parent 869133b commit ae8fda9

File tree

1 file changed

+1
-7
lines changed

1 file changed

+1
-7
lines changed

src/GitHub.Api/UI/TreeBase.cs

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -325,17 +325,11 @@ private List<TNode> GetLeafNodes(TNode node, int idx)
325325
for (var i = idx + 1; i < Nodes.Count && node.Level < Nodes[i].Level; i++)
326326
{
327327
var childNode = Nodes[i];
328-
if (childNode.IsFolder)
329-
{
330-
var leafNodes = GetLeafNodes(childNode, i);
331-
results.AddRange(leafNodes);
332-
}
333-
else
328+
if (!childNode.IsFolder)
334329
{
335330
results.Add(childNode);
336331
}
337332
}
338-
339333
return results;
340334
}
341335

0 commit comments

Comments
 (0)