Skip to content

Commit d222c11

Browse files
authored
Fix avoid showing child attributes if empty (#2842)
1 parent df840da commit d222c11

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

packages/react-openapi/src/OpenAPISchema.tsx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -51,15 +51,15 @@ export function OpenAPISchemaProperty(
5151
return (
5252
<InteractiveSection id={id} className={clsx('openapi-schema', className)}>
5353
<OpenAPISchemaPresentation {...props} />
54-
<OpenAPIDisclosure context={context}>
55-
{properties && properties.length > 0 ? (
54+
{properties && properties.length > 0 ? (
55+
<OpenAPIDisclosure context={context}>
5656
<OpenAPISchemaProperties
5757
properties={properties}
5858
circularRefs={circularRefs}
5959
context={context}
6060
/>
61-
) : null}
62-
</OpenAPIDisclosure>
61+
</OpenAPIDisclosure>
62+
) : null}
6363
</InteractiveSection>
6464
);
6565
}

0 commit comments

Comments
 (0)