Skip to content

Commit

Permalink
fix: Handle undefined in PageSidebar component that was causing a typ…
Browse files Browse the repository at this point in the history
…e error (#480)
  • Loading branch information
JoblersTune authored Nov 28, 2024
1 parent 9c91b4f commit 9f8ddd7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/components/docs/PageSidebar.astro
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ const removeOverview = [
'docs/resources/glossary',
]
const noOverview = removeOverview.includes(Astro.props.slug);
const toc = noOverview
const toc = noOverview && Astro.props.toc !== undefined
? {
...Astro.props.toc,
items: Astro.props.toc?.items.slice(1),
Expand Down

0 comments on commit 9f8ddd7

Please sign in to comment.