Module:Message box: Difference between revisions
fix bug where the arguments where all getting removed if cfg.allowBlankParams wasn't present
m>Mr. Stradivarius (on second thoughts, I like this way of passing params to category handler better) |
m>Mr. Stradivarius (fix bug where the arguments where all getting removed if cfg.allowBlankParams wasn't present) |
||
Line 156: | Line 156: | ||
local newArgs = {} | local newArgs = {} | ||
for k, v in pairs(args) do | for k, v in pairs(args) do | ||
if v ~= '' then | |||
newArgs[k] = v | |||
end | end | ||
end | |||
for i, param in ipairs(cfg.allowBlankParams or {}) do | |||
newArgs[param] = args[param] | |||
end | end | ||
return newArgs | return newArgs |