Skip to content

Commit a26f87a

Browse files
authored
Fix Postman request initialization (#1181)
1 parent bdefdba commit a26f87a

File tree

1 file changed

+5
-1
lines changed
  • packages/docusaurus-theme-openapi-docs/src/theme/ApiExplorer

1 file changed

+5
-1
lines changed

packages/docusaurus-theme-openapi-docs/src/theme/ApiExplorer/index.tsx

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,11 @@ function ApiExplorer({
2222
infoPath: string;
2323
}) {
2424
const postman = new sdk.Request(
25-
item.postman ? (item.postman as any).toJSON() : {}
25+
item.postman
26+
? sdk.Request.isRequest(item.postman)
27+
? (item.postman as any).toJSON()
28+
: (item.postman as any)
29+
: {}
2630
);
2731

2832
return (

0 commit comments

Comments
 (0)