From fb212128f9fe0e63dfec7f73fa22321f66829837 Mon Sep 17 00:00:00 2001 From: Roman Hotsiy Date: Wed, 22 Aug 2018 12:25:02 +0300 Subject: [PATCH] fix: fix crash on empty media object fixes #608 --- src/services/models/MediaType.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/services/models/MediaType.ts b/src/services/models/MediaType.ts index dd87b3ef..ff471e27 100644 --- a/src/services/models/MediaType.ts +++ b/src/services/models/MediaType.ts @@ -56,7 +56,7 @@ export class MediaTypeModel { value: sample, }; } - } else { + } else if (this.schema) { this.examples = { default: new ExampleModel(parser, { value: Sampler.sample(