1
0
mirror of https://github.com/kamranahmedse/developer-roadmap.git synced 2025-08-28 19:49:50 +02:00

Fix table of contents issue

This commit is contained in:
Kamran Ahmed
2025-08-18 18:01:52 +01:00
parent a63eb8e934
commit e471c8b393

View File

@@ -69,12 +69,6 @@ export class GuideRenderer {
}
});
if (toc.length > 5) {
toc.forEach((group) => {
group.children = [];
});
}
const qaSection = node.content?.find((node) => node.type === 'qaSection');
if (hasQASection && qaSection) {
toc.push({
@@ -122,6 +116,12 @@ export class GuideRenderer {
});
}
if (toc.length > 5) {
toc.forEach((group) => {
group.children = [];
});
}
return toc;
}