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)
 
(One intermediate revision 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 43 ⟶ 46:
local args = frame:getParent().args
args.variant = args[1] or args.variant
return p.variant_table(variantargs)
end