File tree Expand file tree Collapse file tree 2 files changed +6
-1
lines changed
packages/docusaurus-theme-openapi-docs/src Expand file tree Collapse file tree 2 files changed +6
-1
lines changed Original file line number Diff line number Diff line change @@ -21,7 +21,9 @@ declare module "@docusaurus/theme-common/internal" {
21
21
import { Props as ILineProps } from "@theme/CodeBlock/Line" ;
22
22
import { PrismTheme } from "prism-react-renderer" ;
23
23
24
- export interface TabProps extends ITabsProps { }
24
+ export interface TabProps extends ITabsProps {
25
+ length ?: number ;
26
+ }
25
27
26
28
export interface CopyButtonProps extends ICopyButtonProps { }
27
29
export interface LineProps extends ILineProps { }
Original file line number Diff line number Diff line change @@ -209,6 +209,9 @@ function TabsComponent(props: TabProps): React.JSX.Element {
209
209
}
210
210
export default function DiscriminatorTabs ( props : TabProps ) : React . JSX . Element {
211
211
const isBrowser = useIsBrowser ( ) ;
212
+
213
+ if ( ! props . length ) return < React . Fragment /> ;
214
+
212
215
return (
213
216
< TabsComponent
214
217
// Remount tabs after hydration
You can’t perform that action at this time.
0 commit comments