check 'defaultValue' before calling 'replace'
fix error "defaultValue.replace is not a function" when defaultValue is Integer
This commit is contained in:
@@ -32,7 +32,9 @@ Handlebars.registerHelper('renderTextParam', function(param) {
|
|||||||
idAtt = ' id=\'' + param.valueId + '\'';
|
idAtt = ' id=\'' + param.valueId + '\'';
|
||||||
}
|
}
|
||||||
|
|
||||||
defaultValue = defaultValue.replace(/'/g,''');
|
if (typeof defaultValue === 'string' || defaultValue instanceof String) {
|
||||||
|
defaultValue = defaultValue.replace(/'/g,''');
|
||||||
|
}
|
||||||
|
|
||||||
if(isArray) {
|
if(isArray) {
|
||||||
result = '<textarea class=\'body-textarea' + (param.required ? ' required' : '') + '\' name=\'' + param.name + '\'' + idAtt + dataVendorExtensions;
|
result = '<textarea class=\'body-textarea' + (param.required ? ' required' : '') + '\' name=\'' + param.name + '\'' + idAtt + dataVendorExtensions;
|
||||||
|
|||||||
Reference in New Issue
Block a user