mirror of
https://github.com/Redocly/redoc.git
synced 2024-11-25 18:13:44 +03:00
fix: fix displaying top-level object without any properties
This commit is contained in:
parent
f3e8ab4f8e
commit
a5468fb7bb
|
@ -65,7 +65,10 @@ export class Schema extends React.Component<Partial<SchemaProps>> {
|
|||
|
||||
switch (type) {
|
||||
case 'object':
|
||||
return <ObjectSchema {...(this.props as any)} />;
|
||||
if (schema.fields?.length) {
|
||||
return <ObjectSchema {...(this.props as any)} />;
|
||||
}
|
||||
break;
|
||||
case 'array':
|
||||
return <ArraySchema {...(this.props as any)} />;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user