mirror of
https://github.com/GitbookIO/gitbook.git
synced 2026-09-12 05:48:57 +00:00
Hotfix docs.radiantdrift.com crashing in production. (#2782)
This commit is contained in:
@@ -0,0 +1,5 @@
|
||||
---
|
||||
'@gitbook/react-openapi': patch
|
||||
---
|
||||
|
||||
Fix an issue where a response object using a special ref would crash the page.
|
||||
@@ -35,8 +35,10 @@ To run a local version of this project, please follow these simple steps.
|
||||
|
||||
### Prerequisites
|
||||
|
||||
- Node.js (Version: >=18.x)
|
||||
- Bun (Version: >=1.2.0)
|
||||
- Node.js (Version: >=20.6)
|
||||
- Use nvm for easy Node management
|
||||
- Bun (Version: >=1.2.1)
|
||||
- We use a text-based lockfile which isn't supported below 1.2.1
|
||||
|
||||
### Set up
|
||||
|
||||
|
||||
@@ -42,6 +42,11 @@ export function OpenAPIResponseExample(props: {
|
||||
.map((response) => {
|
||||
const responseObject = noReference(response[1]);
|
||||
|
||||
// TODO: unnecessary with https://github.com/GitbookIO/gitbook/pull/2780
|
||||
if (!responseObject) {
|
||||
return null;
|
||||
}
|
||||
|
||||
const schema = noReference(
|
||||
(
|
||||
responseObject.content?.['application/json'] ??
|
||||
|
||||
Reference in New Issue
Block a user