Skip to content

Commit b0bf442

Browse files
author
Erik Loyer
committed
Fix option parsing issue
1 parent 49b6192 commit b0bf442

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

system/application/views/widgets/edit/jquery.content_selector_bootstrap.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2810,9 +2810,10 @@ isMac = navigator.userAgent.indexOf('Mac OS X') != -1;
28102810
var type_display_name = 'Comments';
28112811
} else if (opts.types[t] == 'users') {
28122812
var type_display_name = 'Users';
2813-
} else {
2813+
} else if (scalarapi.model.scalarTypes[opts.types[t]]) {
28142814
var type_display_name = scalarapi.model.scalarTypes[opts.types[t]].plural;
2815-
type_display_name = type_display_name.charAt(0).toUpperCase() + type_display_name.slice(1);
2815+
} else {
2816+
var type_display_name = opts.types[t].charAt(0).toUpperCase() + opts.types[t].slice(1);
28162817
}
28172818

28182819
$type_selector.append('<option value="' + opts.types[t] + '">' + type_display_name + '</option>');

0 commit comments

Comments
 (0)