Skip to content

Commit 20c33eb

Browse files
fix: use id as title fallback for complex schemas (#1039)
Co-authored-by: Lukasz Gornicki <[email protected]>
1 parent 544897e commit 20c33eb

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

library/src/components/Schema.tsx

+3-3
Original file line numberDiff line numberDiff line change
@@ -290,7 +290,7 @@ export const Schema: React.FunctionComponent<Props> = ({
290290
idx,
291291
'Adheres to',
292292
'Or to',
293-
s.title(),
293+
s.title() ?? s.id(),
294294
)}
295295
/>
296296
))}
@@ -304,7 +304,7 @@ export const Schema: React.FunctionComponent<Props> = ({
304304
idx,
305305
'Can adhere to',
306306
'Or to',
307-
s.title(),
307+
s.title() ?? s.id(),
308308
)}
309309
/>
310310
))}
@@ -318,7 +318,7 @@ export const Schema: React.FunctionComponent<Props> = ({
318318
idx,
319319
'Consists of',
320320
'And of',
321-
s.title(),
321+
s.title() ?? s.id(),
322322
)}
323323
/>
324324
))}

0 commit comments

Comments
 (0)