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:
parent
0f83d819b8
commit
4b7fe42410
1 changed files with 8 additions and 0 deletions
|
@ -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
|
||||
|
||||
|
|
Loading…
Reference in a new issue