Module:Module introspection: Difference between revisions
mNo edit summary |
bugfix |
||
| Line 223: | Line 223: | ||
function p.make_function_table(module_name, module_funcs, descriptions, main_function) | function p.make_function_table(module_name, module_funcs, descriptions, main_function) | ||
local has_descriptions = | -- Check whether descriptions was passed in | ||
if | local has_descriptions = false | ||
has_descriptions = | if type(descriptions) == "table" then | ||
for _, _ in pairs(descriptions) do | |||
has_descriptions = true | |||
break | |||
end | |||
end | end | ||
| Line 274: | Line 278: | ||
if has_descriptions then | if has_descriptions then | ||
table.insert(lines, "| | table.insert(lines, "| " .. (descriptions[info.name] or "")) | ||
end | end | ||
end | end | ||