Module:Error: Difference between revisions
Jump to navigation
Jump to search
Content deleted Content added
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: | Line 29: | ||
local origArgs |
local origArgs |
||
if frame == mw.getCurrentFrame() then |
if frame == mw.getCurrentFrame() then |
||
-- We're being called via #invoke. |
-- We're being called via #invoke. The args are passed through to the module |
||
-- |
-- from the template page, so use the args that were passed into the template. |
||
origArgs = frame |
origArgs = frame.args |
||
for k, v in pairs(frame.args) do |
|||
origArgs = frame.args |
|||
break |
|||
end |
|||
else |
else |
||
-- We're being called from another module or from the debug console, so assume |
-- We're being called from another module or from the debug console, so assume |