Skip to content

Commit 849d3cf

Browse files
committed
Merge branch 'master' of github.com:swagger-api/swagger-ui
2 parents de0103b + 8e420fa commit 849d3cf

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/main/javascript/helpers/handlebars.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,9 @@ Handlebars.registerHelper('renderTextParam', function(param) {
3232
idAtt = ' id=\'' + param.valueId + '\'';
3333
}
3434

35-
defaultValue = defaultValue.replace(/'/g,''');
35+
if (typeof defaultValue === 'string' || defaultValue instanceof String) {
36+
defaultValue = defaultValue.replace(/'/g,''');
37+
}
3638

3739
if(isArray) {
3840
result = '<textarea class=\'body-textarea' + (param.required ? ' required' : '') + '\' name=\'' + param.name + '\'' + idAtt + dataVendorExtensions;

0 commit comments

Comments
 (0)