From: Jo-Philipp Wich Date: Fri, 10 Jan 2020 21:12:03 +0000 (+0100) Subject: luci-base: dispatcher: remove empty firstchild nodes from menu X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=fd7961337f44ebe8aa71e6ae0925cb70a8c53b21;p=oweals%2Fluci.git luci-base: dispatcher: remove empty firstchild nodes from menu Signed-off-by: Jo-Philipp Wich --- diff --git a/modules/luci-base/luasrc/dispatcher.lua b/modules/luci-base/luasrc/dispatcher.lua index 8dac8d6b6..48e125e4a 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