MCPcopy Create free account
hub / github.com/getsentry/XcodeBuildMCP / flattenSingleChildChain

Function flattenSingleChildChain

src/utils/renderers/path-tree.ts:94–102  ·  view source on GitHub ↗
(node: PathTreeNode)

Source from the content-addressed store, hash-verified

92}
93
94function flattenSingleChildChain(node: PathTreeNode): PathTreeNode {
95 let current = node;
96 while (current.children.size === 1 && current.label === undefined) {
97 const onlyChild = current.children.values().next().value;
98 if (!onlyChild) break;
99 current = onlyChild;
100 }
101 return current;
102}
103
104function renderNode(
105 node: PathTreeNode,

Callers 1

renderNodeFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected