Skip to content

Commit fd289cf

Browse files
committed
🐛 fix type
1 parent 8ada103 commit fd289cf

File tree

1 file changed

+2
-2
lines changed
  • packages/theme-nonepress/src/theme/MDXPage

1 file changed

+2
-2
lines changed

packages/theme-nonepress/src/theme/MDXPage/index.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ export default function MDXPage(props: Props): JSX.Element {
3131
const sidebarCustomProps = frontMatter.sidebar_custom_props as {
3232
sidebar_id: string;
3333
};
34-
const sidebarId = sidebarCustomProps?.sidebar_id || "";
34+
const sidebarId = sidebarCustomProps?.sidebar_id;
3535

3636
return (
3737
<HtmlClassNameProvider
@@ -48,7 +48,7 @@ export default function MDXPage(props: Props): JSX.Element {
4848
toc={toc}
4949
minHeadingLevel={tocMinHeadingLevel}
5050
maxHeadingLevel={tocMaxHeadingLevel}
51-
hideTableOfContents={hideTableOfContents as unknown as boolean}
51+
hideTableOfContents={!!hideTableOfContents}
5252
/>
5353

5454
<Page

0 commit comments

Comments
 (0)