We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 43a72ca commit 56ac298Copy full SHA for 56ac298
lib/schema/union.js
@@ -19,8 +19,6 @@ class Union extends SchemaType {
19
if (!options || !Array.isArray(options.of) || options.of.length === 0) {
20
throw new Error('Union schema type requires an array of types');
21
}
22
- if (options && Array.isArray(options.of)) {
23
- this.schemaTypes = options.of.map(obj => options.parentSchema.interpretAsType(key, obj, schemaOptions));
24
this.schemaTypes = options.of.map(obj => options.parentSchema.interpretAsType(key, obj, schemaOptions));
25
26
0 commit comments