Module:Variants: Difference between revisions
Fix error when no variant smw data exists, and add tracking category
No edit summary |
Im Wired In (talk | contribs) (Fix error when no variant smw data exists, and add tracking category) |
||
(4 intermediate revisions by one other user not shown) | |||
Line 25:
}
local smw_data = mw.smw.ask(query)
if not smw_data then
return {'[[Category:Empty variant list]]'}
end
table.sort(smw_data, sort_entries)
local table_contents = {}
Line 42 ⟶ 45:
function p.main(frame)
local args = frame:getParent().args
args.variant = args[1] or args.variant
return p.variant_table(args)
end
|