luci-base: cbi: optimize tab hide logic
Signed-off-by: Jo-Philipp Wich <jow@openwrt.org>
This commit is contained in:
parent
6f688a3265
commit
7b7783f0ee
1 changed files with 1 additions and 2 deletions
|
@ -947,9 +947,8 @@ function cbi_t_update() {
|
||||||
{
|
{
|
||||||
var t = cbi_t[sid][tid].tab;
|
var t = cbi_t[sid][tid].tab;
|
||||||
var c = cbi_t[sid][tid].container;
|
var c = cbi_t[sid][tid].container;
|
||||||
var n = c.getElementsByTagName('div');
|
|
||||||
|
|
||||||
if (n.length === 0) {
|
if (!c.firstElementChild) {
|
||||||
t.style.display = 'none';
|
t.style.display = 'none';
|
||||||
}
|
}
|
||||||
else if (t.style.display == 'none') {
|
else if (t.style.display == 'none') {
|
||||||
|
|
Loading…
Reference in a new issue