Fix the test case that the previous commit added
Signed-off-by: Uli Schlachter <psychon@znc.in>
This commit is contained in:
parent
923d0b8767
commit
a78f2359d1
|
@ -337,13 +337,15 @@ local function parse_table(t, leave_empty)
|
||||||
local attributes, widgets = {}, {}
|
local attributes, widgets = {}, {}
|
||||||
for k,v in pairs(t) do
|
for k,v in pairs(t) do
|
||||||
if type(k) == "number" then
|
if type(k) == "number" then
|
||||||
-- As `ipairs` doesn't always work on sparse tables, update the
|
if v then
|
||||||
-- maximum
|
-- As `ipairs` doesn't always work on sparse tables, update the
|
||||||
if k > max then
|
-- maximum
|
||||||
max = k
|
if k > max then
|
||||||
end
|
max = k
|
||||||
|
end
|
||||||
|
|
||||||
widgets[k] = v
|
widgets[k] = v
|
||||||
|
end
|
||||||
else
|
else
|
||||||
attributes[k] = v
|
attributes[k] = v
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in New Issue