Skip to content

Commit

Permalink
Fix JS error when getModuleAdminModuleList() returns null for nonexis…
Browse files Browse the repository at this point in the history
…tent modules
  • Loading branch information
kijin committed Apr 24, 2024
1 parent 88ac7ef commit 26fd165
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion modules/module/tpl/js/module_list.js
Expand Up @@ -25,7 +25,7 @@ xe.ModuleListManager = xe.createApp("ModuleListManager", {

this.$selectedObj.nextAll('a').filter('.moduleTrigger').bind('moduleSelect', function(e, aSelected){
var sType, sName, sSrl;

for(var i=0, nLen=aSelected.length; i<nLen; i++){
sType = aSelected[i].mid + ', ' + aSelected[i].type;
sName = aSelected[i].browser_title;
Expand Down Expand Up @@ -83,6 +83,9 @@ xe.ModuleListManager = xe.createApp("ModuleListManager", {

for(var i in data.module_list){
var module = data.module_list[i];
if (!module) {
continue;
}
var obj = $(document.createElement('option'));
obj.val(module.module_srl).html(module.browser_title + ' (' + module.mid + ', ' + module.module_name + ')').appendTo(self.$selectedObj);
}
Expand Down

0 comments on commit 26fd165

Please sign in to comment.