Module:Infobox: Difference between revisions
Appearance
fix Attempt to index upvalue 'origArgs' error |
Fix "attempt to index upvalue 'origArgs' (a nil value)" |
||
Line 399: | Line 399: | ||
end | end | ||
function | local function parseDataParameters() | ||
-- Parse the data parameters in the same order that the old {{infobox}} did, so that | -- Parse the data parameters in the same order that the old {{infobox}} did, so that | ||
-- references etc. will display in the expected places. Parameters that depend on | -- references etc. will display in the expected places. Parameters that depend on | ||
Line 456: | Line 456: | ||
origArgs = frame:getParent().args | origArgs = frame:getParent().args | ||
else | else | ||
origArgs = frame | origArgs = frame | ||
end | end | ||
parseDataParameters() | |||
return _infobox() | return _infobox() | ||
Line 469: | Line 469: | ||
for k,v in pairs(frame.args) do origArgs[k] = mw.text.trim(v) end | for k,v in pairs(frame.args) do origArgs[k] = mw.text.trim(v) end | ||
parseDataParameters() | |||
return _infobox() | return _infobox() |