Module:Variants: Difference between revisions

Fix error when no variant smw data exists, and add tracking category
No edit summary
(Fix error when no variant smw data exists, and add tracking category)
 
(2 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
mw.logObject(args)
return p.variant_table(args)
--return p.variant_table(args)
end