Skip to content

Commit

Permalink
[ML] Fix validation on schema to only check it it's defined/not null
Browse files Browse the repository at this point in the history
  • Loading branch information
qn895 committed Oct 26, 2021
1 parent e355acf commit ebfa1e6
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions x-pack/plugins/transform/common/api_schemas/transforms.ts
Original file line number Diff line number Diff line change
Expand Up @@ -100,8 +100,8 @@ export const _metaSchema = schema.object(
unknowns: 'allow',
validate: (v: object) => {
// Values should all be objects
if (Object.values(v).some((arg) => !(typeof arg === 'object' && arg !== null))) {
return 'Invalid _meta request, expected only object';
if (Object.values(v).some((arg) => arg === undefined || arg === null)) {
return 'Invalid _meta request';
}
},
}
Expand Down

0 comments on commit ebfa1e6

Please sign in to comment.