Module:Room features: Difference between revisions

m
Add null check for table insert
(hide loc qty if 1, add version name)
m (Add null check for table insert)
Line 37:
local ret = ''
local location = args[1] or mw.title.getCurrentTitle().fullText
 
local query = mw.smw.ask(base_query(location))
if query ~= nil then
Line 46:
for i,v in ipairs(query) do
local key = infobox_cat_map[v.infobox_sub or v.infobox]
-- Can be nil - See East Beach for example
table.insert(results_by_type[key], v)
if key ~= nil then
table.insert(results_by_type[key], v)
end
end
for cat,results in pairs(results_by_type) do
51

edits