From b0266d90ab54b4b6f5e02b47831c10dd13f2ada1 Mon Sep 17 00:00:00 2001 From: hachichaud Date: Wed, 13 Sep 2017 17:34:39 +0200 Subject: [PATCH] use recursive call to Node._findSchema to handle nested cases --- src/js/Node.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/js/Node.js b/src/js/Node.js index 0495e646d..e3a9d4bb0 100644 --- a/src/js/Node.js +++ b/src/js/Node.js @@ -2056,13 +2056,13 @@ Node._findSchema = function (schema, path) { if (typeof key === 'string' && childSchema.properties) { childSchema = childSchema.properties[key] || null; if (childSchema) { - foundSchema = childSchema; + foundSchema = Node._findSchema(childSchema, path.slice(i, path.length)); } } else if (typeof key === 'number' && childSchema.items) { childSchema = childSchema.items; if (childSchema) { - foundSchema = childSchema; + foundSchema = Node._findSchema(childSchema, path.slice(i, path.length)); } } }