@fern-api/fdr-sdk 1.2.43-345d4ef0ea → 1.2.44-2a040afc4c

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1759,6 +1759,13 @@ function buildSectionTree(ctx, scopeSegs, parentPath, scopePrefix, changelogScop
1759
1759
  if (!sectionPaths.has(parent)) {
1760
1760
  return nearestExistingAncestor(sec, sectionPaths) === parentPath;
1761
1761
  }
1762
+ if (depth != null) {
1763
+ const pSeg = scopeSegs.find((c) => c.seg.section === parent);
1764
+ const pDepth = pSeg != null ? metaNum(pSeg.seg.metadata, "sidebarDepth") : void 0;
1765
+ if (pDepth != null && depth <= pDepth) {
1766
+ return nearestExistingAncestor(parent, sectionPaths) === parentPath;
1767
+ }
1768
+ }
1762
1769
  return false;
1763
1770
  }).sort((a, b) => a.seg.sortOrder - b.seg.sortOrder);
1764
1771
  const siblingBoundaries = computeDuplicateSiblingSortBoundaries(direct);