Skip to content

Commit

Permalink
Fix broken anchor links when class does not have any types, propertie…
Browse files Browse the repository at this point in the history
…s, or functions

To fix this, we remove any of the top-level categories in the toc if they contain no children
  • Loading branch information
YetAnotherClown committed May 31, 2024
1 parent 463a827 commit e1c7339
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion docusaurus-plugin-moonwave/src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -375,7 +375,9 @@ module.exports = (context, options) => ({
JSON.stringify(luaClass)
)

const tocDataOrdered = parseApiCategories(luaClass, apiCategories)
const tocDataOrdered = parseApiCategories(luaClass, apiCategories).filter(
(element) => element.children.length > 0
)

const tocData = await createData(
`${luaClass.name}-toc.json`,
Expand Down

0 comments on commit e1c7339

Please sign in to comment.