We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 44dec4b commit 0d112f2Copy full SHA for 0d112f2
src/project/types/website/website-sidebar-auto.ts
@@ -171,6 +171,11 @@ async function nodesToEntries(
171
const titleOrder = a.title.toLocaleUpperCase().localeCompare(
172
b.title.toLocaleUpperCase(),
173
);
174
+ if (a.children && !b.children) {
175
+ return 1;
176
+ } else if (b.children && !a.children) {
177
+ return -1;
178
+ }
179
if (a.order !== undefined && b.order !== undefined) {
180
const order = a.order - b.order;
181
return order !== 0 ? order : titleOrder;
0 commit comments