fix: fix crash on empty media object

fixes #608
This commit is contained in:
Roman Hotsiy 2018-08-22 12:25:02 +03:00
parent 5d84bd4656
commit fb212128f9
No known key found for this signature in database
GPG Key ID: 5CB7B3ACABA57CB0

View File

@ -56,7 +56,7 @@ export class MediaTypeModel {
value: sample, value: sample,
}; };
} }
} else { } else if (this.schema) {
this.examples = { this.examples = {
default: new ExampleModel(parser, { default: new ExampleModel(parser, {
value: Sampler.sample( value: Sampler.sample(