Skip to content

Commit

Permalink
random push
Browse files Browse the repository at this point in the history
  • Loading branch information
vishvamsinh28 committed Sep 17, 2024
1 parent e87699d commit 097ce70
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions scripts/build-docs.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,16 +9,16 @@ function buildNavTree(navItems) {
}
};

// First, we make sure that the list of items lists main section items, then subsections, documents last
//first we make sure that list of items lists main section items and then sub sections, documents last
const sortedItems = sortBy(navItems, ['isRootSection', 'weight', 'isSection']);

sortedItems.forEach(item => {
// Identify main sections
//identify main sections
if (item.isRootSection) {
tree[item.rootSectionId] = { item, children: {} };
}

// Identify subsections
//identify subsections
if (item.parent) {
if (!tree[item.parent]) {
throw new Error(`Parent section ${item.parent} not found for item ${item.title}`);
Expand Down

0 comments on commit 097ce70

Please sign in to comment.