diff options
author | Jo-Philipp Wich <jow@openwrt.org> | 2016-01-19 10:36:42 +0100 |
---|---|---|
committer | Jo-Philipp Wich <jow@openwrt.org> | 2016-01-19 10:36:54 +0100 |
commit | 7b7783f0eebce19c365835fdc192b50bd6efb6b9 (patch) | |
tree | 8a18dffa3319a0637d2a809e743a60fed7efe784 /modules/luci-base/htdocs | |
parent | 6f688a32656c09407d31a45b8161cbd7f17dba48 (diff) |
luci-base: cbi: optimize tab hide logic
Signed-off-by: Jo-Philipp Wich <jow@openwrt.org>
Diffstat (limited to 'modules/luci-base/htdocs')
-rw-r--r-- | modules/luci-base/htdocs/luci-static/resources/cbi.js | 3 |
1 files changed, 1 insertions, 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 3e71f17a6e..2274610705 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') { |