luci-mod-admin-full: fix possible switch status layout bug

In some cases we might get status information for more ports than which are
actually usable, prevent overflowing the port status row in this case.

Reported-at: https://forum.lede-project.org/t/x/15897/14
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
This commit is contained in:
Jo-Philipp Wich 2018-06-26 15:24:16 +02:00
parent 2efcc53f2e
commit 60c5d15e9e

View file

@ -35,7 +35,7 @@
{
var th = tr.childNodes[j+1];
if (!th)
if (!th || !th.hasAttribute('data-name'))
continue;
if (ports[j].link)