Skip to content

Commit 492e5fd

Browse files
committed
when the mixed renderer provides the exact schema to use then there is no need to resolve that schema just use it
1 parent ef24610 commit 492e5fd

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

packages/core/src/mappers/renderer.ts

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -592,11 +592,12 @@ export const mapStateToControlProps = (
592592
const required =
593593
controlElement.scope !== undefined &&
594594
isRequired(ownProps.schema, controlElement.scope, rootSchema);
595-
const resolvedSchema = Resolve.schema(
596-
ownProps.schema || rootSchema,
597-
controlElement.scope,
598-
rootSchema
599-
);
595+
const resolvedSchema =
596+
Resolve.schema(
597+
ownProps.schema || rootSchema,
598+
controlElement.scope,
599+
rootSchema
600+
) ?? ownProps.schema; // if resolve fails then rely that the ownProps.schema if exist
600601
const errors = getErrorAt(path, resolvedSchema)(state);
601602

602603
const description =

0 commit comments

Comments
 (0)