docusaurus-theme-openapi-docs 0.0.0-984 → 0.0.0-985

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -238,6 +238,8 @@ function TabsComponent(props) {
238
238
  }
239
239
  function DiscriminatorTabs(props) {
240
240
  const isBrowser = (0, useIsBrowser_1.default)();
241
+ if (!props.length)
242
+ return react_1.default.createElement(react_1.default.Fragment, null);
241
243
  return react_1.default.createElement(
242
244
  TabsComponent,
243
245
  // Remount tabs after hydration
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "docusaurus-theme-openapi-docs",
3
3
  "description": "OpenAPI theme for Docusaurus.",
4
- "version": "0.0.0-984",
4
+ "version": "0.0.0-985",
5
5
  "license": "MIT",
6
6
  "keywords": [
7
7
  "openapi",
@@ -36,7 +36,7 @@
36
36
  "@types/lodash": "^4.14.176",
37
37
  "@types/pako": "^2.0.3",
38
38
  "concurrently": "^5.2.0",
39
- "docusaurus-plugin-openapi-docs": "0.0.0-984",
39
+ "docusaurus-plugin-openapi-docs": "0.0.0-985",
40
40
  "docusaurus-plugin-sass": "^0.2.3",
41
41
  "eslint-plugin-prettier": "^5.0.1"
42
42
  },
@@ -79,5 +79,5 @@
79
79
  "engines": {
80
80
  "node": ">=14"
81
81
  },
82
- "gitHead": "316177cb6b29b63bf1b19fb8b8b0d709b89fa6a5"
82
+ "gitHead": "9bdb2f50d0a01aa03ed4b3e5ba4a2ed67d55b02c"
83
83
  }
@@ -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
@@ -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 {}