Skip to content

Commit cb204f3

Browse files
committed
move to fix from #2853
1 parent b743fea commit cb204f3

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

packages/utils/src/schema/toPathSchema.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ export default function toPathSchema<T = any>(
3838
} as PathSchema;
3939

4040
if (ADDITIONAL_PROPERTIES_KEY in schema &&
41-
schema[ADDITIONAL_PROPERTIES_KEY] !== false) {
41+
schema[ADDITIONAL_PROPERTIES_KEY] === true) {
4242
set(pathSchema, '__rjsf_additionalProperties', true);
4343
}
4444

packages/utils/test/schema/toPathSchemaTest.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ export default function toPathSchemaTest(testValidator: TestValidatorType) {
1515
$name: "",
1616
__rjsf_additionalProperties: true,
1717
});
18+
});
1819
it('should return a pathSchema for root field, without additional properties', () => {
1920
const schema: RJSFSchema = { type: 'string', additionalProperties: false };
2021

0 commit comments

Comments
 (0)