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>
This commit is contained in:
Jo-Philipp Wich 2016-08-18 10:02:51 +02:00
parent c390a09cea
commit 19981732fc

View file

@ -17,6 +17,9 @@
{
var th = document.getElementById('portstatus-' + switches[i] + '-' + j);
if (!th)
continue;
if (ports[j].link)
{
th.innerHTML = String.format(