diff options
author | Jo-Philipp Wich <jo@mein.io> | 2020-01-10 22:12:03 +0100 |
---|---|---|
committer | Jo-Philipp Wich <jo@mein.io> | 2020-01-10 22:13:27 +0100 |
commit | fd7961337f44ebe8aa71e6ae0925cb70a8c53b21 (patch) | |
tree | 6231f54b2a45f6d7af354c5c891f3b14f68f6692 | |
parent | ff12aa39f072615aab314f8fa3518400a83eb871 (diff) |
luci-base: dispatcher: remove empty firstchild nodes from menu
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
-rw-r--r-- | modules/luci-base/luasrc/dispatcher.lua | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/modules/luci-base/luasrc/dispatcher.lua b/modules/luci-base/luasrc/dispatcher.lua index 8dac8d6b6e..48e125e4ae 100644 --- a/modules/luci-base/luasrc/dispatcher.lua +++ b/modules/luci-base/luasrc/dispatcher.lua @@ -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 |