mirror of
https://github.com/GitbookIO/gitbook.git
synced 2026-09-16 23:55:20 +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
|
### Prerequisites
|
||||||
|
|
||||||
- Node.js (Version: >=18.x)
|
- Node.js (Version: >=20.6)
|
||||||
- Bun (Version: >=1.2.0)
|
- 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
|
### Set up
|
||||||
|
|
||||||
|
|||||||
@@ -42,6 +42,11 @@ export function OpenAPIResponseExample(props: {
|
|||||||
.map((response) => {
|
.map((response) => {
|
||||||
const responseObject = noReference(response[1]);
|
const responseObject = noReference(response[1]);
|
||||||
|
|
||||||
|
// TODO: unnecessary with https://github.com/GitbookIO/gitbook/pull/2780
|
||||||
|
if (!responseObject) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
const schema = noReference(
|
const schema = noReference(
|
||||||
(
|
(
|
||||||
responseObject.content?.['application/json'] ??
|
responseObject.content?.['application/json'] ??
|
||||||
|
|||||||
Reference in New Issue
Block a user