From 7b7783f0eebce19c365835fdc192b50bd6efb6b9 Mon Sep 17 00:00:00 2001 From: Jo-Philipp Wich Date: Tue, 19 Jan 2016 10:36:42 +0100 Subject: [PATCH] luci-base: cbi: optimize tab hide logic Signed-off-by: Jo-Philipp Wich --- modules/luci-base/htdocs/luci-static/resources/cbi.js | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/modules/luci-base/htdocs/luci-static/resources/cbi.js b/modules/luci-base/htdocs/luci-static/resources/cbi.js index 3e71f17a6..227461070 100644 --- a/modules/luci-base/htdocs/luci-static/resources/cbi.js +++ b/modules/luci-base/htdocs/luci-static/resources/cbi.js @@ -947,9 +947,8 @@ function cbi_t_update() { { var t = cbi_t[sid][tid].tab; var c = cbi_t[sid][tid].container; - var n = c.getElementsByTagName('div'); - if (n.length === 0) { + if (!c.firstElementChild) { t.style.display = 'none'; } else if (t.style.display == 'none') { -- 2.25.1