Fixes an undefined error when type is defined in the schema

This commit is contained in:
Brenton McSweyn
2015-10-11 10:32:34 +11:00
committed by Josh Ponelat
parent 0bd93c84a4
commit 0665ee8557

View File

@@ -8,7 +8,8 @@ Handlebars.registerHelper('sanitize', function(html) {
Handlebars.registerHelper('renderTextParam', function(param) {
var result, type = 'text', idAtt = '';
var isArray = param.type.toLowerCase() === 'array' || param.allowMultiple;
var paramType = param.type || param.schema.type || '';
var isArray = paramType.toLowerCase() === 'array' || param.allowMultiple;
var defaultValue = isArray && Array.isArray(param.default) ? param.default.join('\n') : param.default;
var dataVendorExtensions = Object.keys(param).filter(function(property) {