17,273
edits
(fix iteration) |
(fix bool check on number (0 is not falsy)) |
||
Line 90: | Line 90: | ||
-- split sections into top-level items and groups with second-level items | -- split sections into top-level items and groups with second-level items | ||
for _, section in ipairs( root.sections ) do | for _, section in ipairs( root.sections ) do | ||
if #section.sections then | if #section.sections > 0 then | ||
root.groups[#root.groups + 1] = section | root.groups[#root.groups + 1] = section | ||
else | else |