refactor: mark toc in loaded MDX as non-optional (#7524)

This commit is contained in:
Joshua Chen 2022-05-29 22:36:41 +08:00 committed by GitHub
parent 8b1acb50d1
commit f443e992b9
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
11 changed files with 34 additions and 18 deletions

View file

@ -77,9 +77,7 @@ function ChangelogPageContent(props: Props): JSX.Element {
<BlogLayout
sidebar={sidebar}
toc={
!hideTableOfContents &&
BlogPostContents.toc &&
BlogPostContents.toc.length > 0 ? (
!hideTableOfContents && BlogPostContents.toc.length > 0 ? (
<TOC
toc={BlogPostContents.toc}
minHeadingLevel={tocMinHeadingLevel}