From 3f698caabe6a8544c62d457ff94041a052c0ba17 Mon Sep 17 00:00:00 2001 From: Roman Hotsiy Date: Wed, 2 Mar 2016 08:56:09 +0400 Subject: [PATCH] Fix required for JsonSchema component (fixes #28) --- lib/components/JsonSchema/json-schema.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/components/JsonSchema/json-schema.js b/lib/components/JsonSchema/json-schema.js index b8d0dbb1..c946a96c 100644 --- a/lib/components/JsonSchema/json-schema.js +++ b/lib/components/JsonSchema/json-schema.js @@ -59,8 +59,8 @@ export default class JsonSchema extends BaseComponent { this.pointer = schema._pointer || this.pointer; this.requiredMap = {}; - if (this.schema.required) { - this.schema.required.forEach(prop => this.requiredMap[prop] = true); + if (this.componentSchema.required) { + this.componentSchema.required.forEach(prop => this.requiredMap[prop] = true); } if (!schema.properties) {