diff --git a/lib/helpers.js b/lib/helpers.js index 7560974e16..d4eb233f22 100644 --- a/lib/helpers.js +++ b/lib/helpers.js @@ -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;