We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 4b41bb1 commit 3c6de2cCopy full SHA for 3c6de2c
src/components/Schema/Schema.tsx
@@ -40,6 +40,13 @@ export class Schema extends React.Component<Partial<SchemaProps>> {
40
}
41
42
if (discriminatorProp !== undefined) {
43
+ if (!oneOf || !oneOf.length) {
44
+ throw new Error(
45
+ `Looks like you are using discriminator wrong: you don't have any definition inherited from the ${
46
+ schema.title
47
+ }`,
48
+ );
49
+ }
50
return (
51
<ObjectSchema
52
{...{ ...this.props, schema: oneOf![schema.activeOneOf] }}
0 commit comments