diff options
author | Jo-Philipp Wich <jo@mein.io> | 2016-08-18 10:02:51 +0200 |
---|---|---|
committer | Jo-Philipp Wich <jo@mein.io> | 2016-08-18 10:02:53 +0200 |
commit | 19981732fc50073a80cca29d430005a11426c706 (patch) | |
tree | f04c73e9f391c827dc52b662499f3392f5e0f1b6 /modules/luci-mod-admin-full | |
parent | c390a09cea580ddb0a400c844751f0b65b69d3aa (diff) |
luci-mod-admin-full: properly skip over unused switch ports
Fix incomplete port status display on vlan setup page when ports in the middle
are not used, e.g. some Lantiq boards use ports 0, 1, 2 and 4 for LAN ports so
JS code should not attempt to reference an undefined status element for port 3.
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
Diffstat (limited to 'modules/luci-mod-admin-full')
-rw-r--r-- | modules/luci-mod-admin-full/luasrc/view/admin_network/switch_status.htm | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/modules/luci-mod-admin-full/luasrc/view/admin_network/switch_status.htm b/modules/luci-mod-admin-full/luasrc/view/admin_network/switch_status.htm index f740a4a863..96fbffdb02 100644 --- a/modules/luci-mod-admin-full/luasrc/view/admin_network/switch_status.htm +++ b/modules/luci-mod-admin-full/luasrc/view/admin_network/switch_status.htm @@ -17,6 +17,9 @@ { var th = document.getElementById('portstatus-' + switches[i] + '-' + j); + if (!th) + continue; + if (ports[j].link) { th.innerHTML = String.format( |