Skip to content

Commit 8d49c63

Browse files
fix(editor): correct nested section labels in create-page dropdown (#4700)
Co-authored-by: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com> Co-authored-by: [email protected] <[email protected]> Co-authored-by: Stephen Chen <[email protected]>
1 parent 306eda1 commit 8d49c63

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

packages/fern-docs/components/src/navigation/pageUtils.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -168,13 +168,13 @@ export function getAllSectionsFromSectionNode(
168168
sectionPath: [
169169
...sectionNode.sectionPath,
170170
{
171-
id: sectionNode.id,
172-
type: sectionNode.type,
173-
title: sectionNode.title
171+
id: child.id,
172+
type: child.type,
173+
title: child.title
174174
}
175175
]
176176
};
177-
result.push(section);
177+
result.push(section, ...getAllSectionsFromSectionNode(section));
178178
}
179179
}
180180
return result;

0 commit comments

Comments
 (0)