From 60c5d15e9eb46016bba7383b103cf95ebb997886 Mon Sep 17 00:00:00 2001 From: Jo-Philipp Wich Date: Tue, 26 Jun 2018 15:24:16 +0200 Subject: 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 --- modules/luci-mod-admin-full/luasrc/view/admin_network/switch_status.htm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 d3d07bead9..8a42a117e1 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 @@ -35,7 +35,7 @@ { var th = tr.childNodes[j+1]; - if (!th) + if (!th || !th.hasAttribute('data-name')) continue; if (ports[j].link) -- cgit v1.2.3