8,756
edits
mNo edit summary |
(error handling) |
||
Line 59: | Line 59: | ||
local result = p.main(name, 'ObjectID', 'PlainName') | local result = p.main(name, 'ObjectID', 'PlainName') | ||
if not next(result) then | if result == nil then | ||
return name .. '(no results)' | |||
elseif not next(result) then | |||
return name .. '(no results)' | return name .. '(no results)' | ||
else | else | ||
Line 72: | Line 74: | ||
end | end | ||
local result = p.main(name, 'ObjectID', '_pageName=Page') | local result = p.main(name, 'ObjectID', '_pageName=Page') | ||
if not next(result) then | if result == nil then | ||
return name .. '(no results)' | |||
elseif not next(result) then | |||
return name .. '(no results)' | return name .. '(no results)' | ||
else | else |