docusaurus-theme-openapi-docs 0.0.0-718 → 0.0.0-720

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.
@@ -43,9 +43,11 @@ function ApiItem(props) {
43
43
  const { schema } = frontMatter;
44
44
  // decompress and parse
45
45
  if (api) {
46
- api = JSON.parse(
47
- zlib_1.default.inflateSync(Buffer.from(api, "base64")).toString()
48
- );
46
+ try {
47
+ api = JSON.parse(
48
+ zlib_1.default.inflateSync(Buffer.from(api, "base64")).toString()
49
+ );
50
+ } catch {}
49
51
  }
50
52
  const { siteConfig } = (0, useDocusaurusContext_1.default)();
51
53
  const themeConfig = siteConfig.themeConfig;
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-718",
4
+ "version": "0.0.0-720",
5
5
  "license": "MIT",
6
6
  "keywords": [
7
7
  "openapi",
@@ -43,7 +43,7 @@
43
43
  "clsx": "^1.1.1",
44
44
  "copy-text-to-clipboard": "^3.1.0",
45
45
  "crypto-js": "^4.1.1",
46
- "docusaurus-plugin-openapi-docs": "0.0.0-718",
46
+ "docusaurus-plugin-openapi-docs": "0.0.0-720",
47
47
  "docusaurus-plugin-sass": "^0.2.3",
48
48
  "file-saver": "^2.0.5",
49
49
  "lodash": "^4.17.20",
@@ -68,5 +68,5 @@
68
68
  "engines": {
69
69
  "node": ">=14"
70
70
  },
71
- "gitHead": "92efdb02def3c18c2ecc370cfc09d24160ce7c2f"
71
+ "gitHead": "1d416d461bde0425166d15b21f200b1aeb7f71b5"
72
72
  }
@@ -57,11 +57,12 @@ export default function ApiItem(props: Props): JSX.Element {
57
57
  const { schema } = frontMatter as SchemaFrontMatter;
58
58
  // decompress and parse
59
59
  if (api) {
60
- api = JSON.parse(
61
- zlib.inflateSync(Buffer.from(api as any, "base64")).toString()
62
- );
60
+ try {
61
+ api = JSON.parse(
62
+ zlib.inflateSync(Buffer.from(api as any, "base64")).toString()
63
+ );
64
+ } catch {}
63
65
  }
64
-
65
66
  const { siteConfig } = useDocusaurusContext();
66
67
  const themeConfig = siteConfig.themeConfig as ThemeConfig;
67
68
  const options = themeConfig.api;