Skip to content

Commit ccf2cff

Browse files
authored
Hotfix docs.radiantdrift.com crashing in production. (#2782)
1 parent f7b801b commit ccf2cff

File tree

3 files changed

+14
-2
lines changed

3 files changed

+14
-2
lines changed

.changeset/loud-dodos-rhyme.md

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'@gitbook/react-openapi': patch
3+
---
4+
5+
Fix an issue where a response object using a special ref would crash the page.

README.md

+4-2
Original file line numberDiff line numberDiff line change
@@ -35,8 +35,10 @@ To run a local version of this project, please follow these simple steps.
3535

3636
### Prerequisites
3737

38-
- Node.js (Version: >=18.x)
39-
- Bun (Version: >=1.2.0)
38+
- Node.js (Version: >=20.6)
39+
- Use nvm for easy Node management
40+
- Bun (Version: >=1.2.1)
41+
- We use a text-based lockfile which isn't supported below 1.2.1
4042

4143
### Set up
4244

packages/react-openapi/src/OpenAPIResponseExample.tsx

+5
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,11 @@ export function OpenAPIResponseExample(props: {
4242
.map((response) => {
4343
const responseObject = noReference(response[1]);
4444

45+
// TODO: unnecessary with https://github.com/GitbookIO/gitbook/pull/2780
46+
if (!responseObject) {
47+
return null;
48+
}
49+
4550
const schema = noReference(
4651
(
4752
responseObject.content?.['application/json'] ??

0 commit comments

Comments
 (0)