Skip to content

Commit 0752269

Browse files
fix: do not omit patternProperties when properties is undefined
1 parent 031431b commit 0752269

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

library/src/components/Schema.tsx

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -377,13 +377,10 @@ interface SchemaPropertiesProps {
377377
const SchemaProperties: React.FunctionComponent<SchemaPropertiesProps> = ({
378378
schema,
379379
}) => {
380-
const properties = schema.properties();
381-
if (properties === undefined || !Object.keys(properties)) {
382-
return null;
383-
}
380+
const properties = schema.properties() ?? {};
381+
const patternProperties = schema.patternProperties() ?? {};
384382

385383
const required = schema.required() ?? [];
386-
const patternProperties = schema.patternProperties();
387384

388385
return (
389386
<>

0 commit comments

Comments
 (0)