Difference between revisions of "Module:Arguments"

Jump to navigation Jump to search
65 bytes added ,  21:50, 10 December 2013
don't use "if frame == mw.getCurrentFrame()"
>Mr. Stradivarius
m (Protected Module:Arguments: High-risk Lua module ([Edit=Allow only autoconfirmed users] (indefinite) [Move=Allow only autoconfirmed users] (indefinite)))
>Mr. Stradivarius
(don't use "if frame == mw.getCurrentFrame()")
Line 10: Line 10:
-- from another Lua module or from the debug console, so put the args in a special table so we can differentiate them.
-- from another Lua module or from the debug console, so put the args in a special table so we can differentiate them.
local fargs, pargs, luaArgs
local fargs, pargs, luaArgs
if frame == mw.getCurrentFrame() then
if type(frame) == 'table' and type(frame.args) == 'table' and type(frame.getParent) == 'function' then
fargs = frame.args
fargs = frame.args
pargs = frame:getParent().args
pargs = frame:getParent().args
Anonymous user

Navigation menu