luci2: Hide empty tabs when rendering cbi maps
[project/luci2/ui.git] / luci2 / htdocs / luci2 / luci2.js
index 996c18d..30e3063 100644 (file)
@@ -6841,6 +6841,9 @@ function LuCI2()
                        if (cur == tab_index)
                                tabh.addClass('active');
 
+                       if (!tab.fields.length)
+                               tabh.hide();
+
                        return tabh;
                },