summaryrefslogtreecommitdiffhomepage
path: root/modules/luci-mod-admin-full/luasrc
diff options
context:
space:
mode:
authorJo-Philipp Wich <jo@mein.io>2016-08-18 10:02:51 +0200
committerJo-Philipp Wich <jo@mein.io>2016-08-18 10:02:53 +0200
commit19981732fc50073a80cca29d430005a11426c706 (patch)
treef04c73e9f391c827dc52b662499f3392f5e0f1b6 /modules/luci-mod-admin-full/luasrc
parentc390a09cea580ddb0a400c844751f0b65b69d3aa (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/luasrc')
-rw-r--r--modules/luci-mod-admin-full/luasrc/view/admin_network/switch_status.htm3
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 f740a4a86..96fbffdb0 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(