X-Git-Url: https://git.archive.openwrt.org/?a=blobdiff_plain;ds=sidebyside;f=modules%2Fluci-base%2Fhtdocs%2Fluci-static%2Fresources%2Fcbi.js;h=15645d902c9c5e2c456602be844b3b61672c0076;hb=aa12e53333b47800e85fcc2acc16b5c10af8a91f;hp=1c4123bdadcb3cd7465e1277678ddede2b67137f;hpb=31816e92f109e0c534f176ca1e79b032917c876c;p=project%2Fluci.git diff --git a/modules/luci-base/htdocs/luci-static/resources/cbi.js b/modules/luci-base/htdocs/luci-static/resources/cbi.js index 1c4123bda..15645d902 100644 --- a/modules/luci-base/htdocs/luci-static/resources/cbi.js +++ b/modules/luci-base/htdocs/luci-static/resources/cbi.js @@ -475,7 +475,7 @@ function cbi_d_update() { if (node && node.parentNode && !cbi_d_check(entry.deps)) { node.parentNode.removeChild(node); state = true; - if( entry.parent ) + if( entry.parent && typeof(cbi_c[entry.parent]) == 'number') cbi_c[entry.parent]--; } else if ((!node || !node.parentNode) && cbi_d_check(entry.deps)) { if (!next) { @@ -484,7 +484,7 @@ function cbi_d_update() { next.parentNode.insertBefore(entry.node, next); } state = true; - if( entry.parent ) + if( entry.parent && typeof(cbi_c[entry.parent]) == 'number' ) cbi_c[entry.parent]++; } } @@ -935,7 +935,10 @@ function cbi_t_update() { for( var sid in cbi_t ) for( var tid in cbi_t[sid] ) { - if( cbi_c[cbi_t[sid][tid].cid] == 0 ) { + if (typeof(cbi_c[cbi_t[sid][tid].cid]) !== 'number') { + continue; + } + else if( cbi_c[cbi_t[sid][tid].cid] == 0 ) { cbi_t[sid][tid].tab.style.display = 'none'; } else if( cbi_t[sid][tid].tab && cbi_t[sid][tid].tab.style.display == 'none' ) {