Skip to content

Commit 523f24d

Browse files
committed
fix: schema errors for empty array resolved
1 parent 411d204 commit 523f24d

File tree

2 files changed

+1
-2
lines changed

2 files changed

+1
-2
lines changed

src/demo/body/Example.jsx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,6 @@ import translateRangeDate from '../../fields/interceptors/translate-range-date';
2424
import translateRatings from '../../fields/interceptors/translate-ratings';
2525

2626
const FormComponent = ({
27-
locationHash,
2827
givenSchema,
2928
givenXhrSchema,
3029
givenUISchema,

src/helpers/state-machine/form/form-state.guards.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ const GUARDS = {
4646
currentUISchema, 'ui:page.ui:layout',
4747
) === 'steps',
4848
});
49-
isSchemaValid = !schemaErrors && !isError;
49+
isSchemaValid = Array.isArray(schemaErrors) ? schemaErrors.length === 0 && !isError : !schemaErrors && !isError;
5050
}
5151
catch (er) {
5252
// console.log(er);

0 commit comments

Comments
 (0)