summaryrefslogtreecommitdiffhomepage
path: root/themes/luci-theme-material/htdocs/luci-static/resources/menu-material.js
diff options
context:
space:
mode:
Diffstat (limited to 'themes/luci-theme-material/htdocs/luci-static/resources/menu-material.js')
-rw-r--r--themes/luci-theme-material/htdocs/luci-static/resources/menu-material.js6
1 files changed, 3 insertions, 3 deletions
diff --git a/themes/luci-theme-material/htdocs/luci-static/resources/menu-material.js b/themes/luci-theme-material/htdocs/luci-static/resources/menu-material.js
index 3499d5d19f..a994c4f463 100644
--- a/themes/luci-theme-material/htdocs/luci-static/resources/menu-material.js
+++ b/themes/luci-theme-material/htdocs/luci-static/resources/menu-material.js
@@ -117,12 +117,12 @@ return baseclass.extend({
if (isActive)
this.renderMainMenu(children[i], children[i].name);
- if (i > 0 || i < children.length)
+ if (i > 0 && i < children.length)
ul.appendChild(E('li', {'class': 'divider'}, [E('span')]))
}
- if (ul.children.length > 1)
- ul.style.display = '';
+ if (children.length > 1)
+ ul.parentElement.style.display = '';
},
renderTabMenu: function(tree, url, level) {