Module:Error: Difference between revisions

simplify argument-grabbing code
m (Protected Module:Error: Highly visible template or Lua module ([Edit=Block all non-admin users] (indefinite) [Move=Block all non-admin users] (indefinite)))
(simplify argument-grabbing code)
Line 29:
local origArgs
if frame == mw.getCurrentFrame() then
-- We're being called via #invoke. IfThe theargs invoking templateare passed anythrough args,to the usemodule
-- them.from Otherwisethe template page, so use the args that were passed into the template.
origArgs = frame:getParent().args
for k, v in pairs(frame.args) do
origArgs = frame.args
break
end
else
-- We're being called from another module or from the debug console, so assume
Anonymous user