Skip to content

Commit

Permalink
wip(curriculum): remove phantom empty item from TOC
Browse files Browse the repository at this point in the history
  • Loading branch information
LeoMcA committed Feb 2, 2024
1 parent bcb3274 commit 2ad0280
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions build/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -324,13 +324,12 @@ export function makeTOC(doc, withH3 = false) {
return doc.body
.map((section) => {
if (
((section.type === "prose" ||
(section.type === "prose" ||
section.type === "browser_compatibility" ||
section.type === "specifications") &&
section.value.id &&
section.value.title &&
!section.value.isH3) ||
withH3
section.value.id &&
section.value.title &&
(!section.value.isH3 || withH3)
) {
return { text: section.value.title, id: section.value.id };
}
Expand Down

0 comments on commit 2ad0280

Please sign in to comment.