Skip to content

Commit

Permalink
fix(core): discriminator nullable property
Browse files Browse the repository at this point in the history
  • Loading branch information
anymaniax committed Apr 15, 2024
1 parent 39a1884 commit 7294c32
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/core/src/getters/discriminators.ts
Expand Up @@ -35,7 +35,7 @@ export const resolveDiscriminators = (
...subTypeSchema.properties,
[propertyName]: {
type: 'string',
enum: [...(property.enum ?? []), mappingKey],
enum: [...(property?.enum ?? []), mappingKey],
},
};
subTypeSchema.required = [
Expand Down

0 comments on commit 7294c32

Please sign in to comment.