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

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
(cherry picked from commit fd7961337f)
This commit is contained in:
Jo-Philipp Wich 2020-01-10 22:12:03 +01:00
parent 0f83d819b8
commit 4b7fe42410

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