Skip to content
Snippets Groups Projects
Commit 5df8f20c authored by hackerman's avatar hackerman Committed by Alvaro Cabrera Durán
Browse files

Resolve issue with required field in oneOf (#534)

Having a schema that has a oneOf definition as such:

```
{
  "oneOf": [
    { required: ["foo"], /*...*/ },
    { /*...*/ },
  ]
}
```

causes the changed line to fail with error message `calling includes on undefined`. This does not always happen, as it appears that the "oneOf" field is being picked by random.

This patch simply uses a default empty array if `fixed.required` is undefined, resolving this issue.
parent 2fd626ff
No related branches found
No related tags found
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment