Changes

no edit summary
Line 181: Line 181:     
function Utils.requireModule(name)
 
function Utils.requireModule(name)
     return pcall(function () return require(string.format("Module:%s", name)) end)
+
     local success, data = pcall(function () return require(string.format("Module:%s", name)) end)
 +
    -- module without return (or empty, nil, false, true return) gives success = true, data = true
 +
    if data == true then
 +
        return false, nil
 +
    else
 +
        return success, data
 +
    end
 
end
 
end
  
cssedit, gkautomate
7,064

edits