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:
@@ -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');
|
const qaSection = node.content?.find((node) => node.type === 'qaSection');
|
||||||
if (hasQASection && qaSection) {
|
if (hasQASection && qaSection) {
|
||||||
toc.push({
|
toc.push({
|
||||||
@@ -122,6 +116,12 @@ export class GuideRenderer {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (toc.length > 5) {
|
||||||
|
toc.forEach((group) => {
|
||||||
|
group.children = [];
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
return toc;
|
return toc;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user