Skip to content

Commit

Permalink
fix: align visitSidebarNode implementation with visitSidebarNodeRaw
Browse files Browse the repository at this point in the history
  • Loading branch information
abvthecity committed Mar 26, 2024
1 parent daacd38 commit 94fff24
Showing 1 changed file with 3 additions and 7 deletions.
10 changes: 3 additions & 7 deletions packages/commons/fdr-utils/src/visitSidebarNode.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,20 +11,16 @@ export function visitSidebarNode(
pageGroup: (pageGroup) => {
pageGroup.pages.forEach((page) => {
if (page.type !== "link") {
visit(page, [...parentNodes, pageGroup]);
visitSidebarNode(page, visit, parentNodes);
}
});
},
apiSection: (apiSection) => {
apiSection.items.forEach((item) => {
if (SidebarNode.isSubpackageSection(item)) {
visitSidebarNode(item, visit, [...parentNodes, apiSection]);
} else {
visit(item, [...parentNodes, apiSection]);
}
visitSidebarNode(item, visit, [...parentNodes, apiSection]);
});
if (apiSection.changelog) {
visit(apiSection.changelog, [...parentNodes, apiSection]);
visitSidebarNode(apiSection.changelog, visit, [...parentNodes, apiSection]);
}
},
section: (section) => {
Expand Down

0 comments on commit 94fff24

Please sign in to comment.