diff --git a/view/js/mod_settings.js b/view/js/mod_settings.js
index cb0b44ff2..f9faa3d5c 100644
--- a/view/js/mod_settings.js
+++ b/view/js/mod_settings.js
@@ -41,10 +41,15 @@ function previewTheme(elm) {
$.getJSON('theme_info/' + theme,function(data) {
$('#theme-preview').html('
' + data.desc + '
' + data.version + '
' + data.credits + '
');
$('#id_schema').empty();
- $(data.schemas).each(function(index,item) {
- $('',{value:item['key'],text:item['val']}).appendTo('#id_schema');
- });
- $('#id_schema').val(schema ? schema : '---');
+ if(data.schemas.length) {
+ $(data.schemas).each(function(index,item) {
+ $('',{value:item['key'],text:item['val']}).appendTo('#id_schema');
+ });
+ $('#id_schema').val(schema ? schema : '---');
+ }
+ else {
+ $('',{value:'',text:'No schemes available'}).appendTo('#id_schema');
+ }
$('#custom-settings-content .section-content-tools-wrapper').html(data.config);
});
}