Hotfix docs.radiantdrift.com crashing in production. (#2782)

This commit is contained in:
Steven H
2025-01-29 12:42:01 +00:00
committed by GitHub
parent f7b801b4c8
commit ccf2cffc4b
3 changed files with 14 additions and 2 deletions
+5
View File
@@ -0,0 +1,5 @@
---
'@gitbook/react-openapi': patch
---
Fix an issue where a response object using a special ref would crash the page.
+4 -2
View File
@@ -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'] ??