comparison mod_register_apps/mod_register_apps.lua @ 4114:4656a64e59be

mod_register_apps: Prevent traceback if hide_apps is unset (thanks meaz)
author Kim Alvefur <zash@zash.se>
date Sat, 12 Sep 2020 21:18:48 +0200
parents c85af57e82e0
children 85fa8c9e992a
comparison
equal deleted inserted replaced
4113:c85af57e82e0 4114:4656a64e59be
120 end 120 end
121 121
122 for _, app_info in ipairs(app_config) do 122 for _, app_info in ipairs(app_config) do
123 local app_id = app_info.id or app_info.name:gsub("%W+", "-"):lower(); 123 local app_id = app_info.id or app_info.name:gsub("%W+", "-"):lower();
124 if (not show_apps or show_apps:contains(app_id)) 124 if (not show_apps or show_apps:contains(app_id))
125 and not hide_apps:contains(app_id) then 125 and not (hide_apps and hide_apps:contains(app_id)) then
126 app_info.id = app_id; 126 app_info.id = app_id;
127 app_info.image = relurl(app_info.image); 127 app_info.image = relurl(app_info.image);
128 site_apps[app_id] = app_info; 128 site_apps[app_id] = app_info;
129 app_info._source = module.name; 129 app_info._source = module.name;
130 table.insert(site_apps, app_info); 130 table.insert(site_apps, app_info);