luci-base: dispatcher: remove empty firstchild nodes from menu

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
This commit is contained in:
Jo-Philipp Wich 2020-01-10 22:12:03 +01:00
parent ff12aa39f0
commit fd7961337f

View file

@ -623,6 +623,14 @@ local function merge_trees(node_a, node_b)
node_a[k] = v
end
end
if type(node_a.action) == "table" and
node_a.action.type == "firstchild" and
node_a.children == nil
then
node_a.satisfied = false
end
return node_a
end