Skip to content

Commit

Permalink
Merge pull request #1396 from tomgreenfield/issue/1395
Browse files Browse the repository at this point in the history
Fix error when defining JSON objects in schema
  • Loading branch information
brian-learningpool authored Dec 13, 2016
2 parents b26533b + 62f6b48 commit 8e101e5
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion lib/helpers.js
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,9 @@ function schemaToObject (schema, id, version, location) {
child[key] = prop.default || [];
break;
case "object":
child[key] = walkObject(prop.properties);
var nestedProps = prop.properties;

child[key] = nestedProps ? walkObject(nestedProps) : prop.default || {};
break;
default:
break;
Expand Down

0 comments on commit 8e101e5

Please sign in to comment.