From db6234c23735c6f0909679128ae85c50cf436001 Mon Sep 17 00:00:00 2001 From: Stephen Fenwick Date: Tue, 18 Jun 2024 20:47:43 +1200 Subject: [PATCH] Correctly handle speed = -1 --- .../luci-static/resources/view/status/include/29_ports.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/luci-mod-status/htdocs/luci-static/resources/view/status/include/29_ports.js b/modules/luci-mod-status/htdocs/luci-static/resources/view/status/include/29_ports.js index b511897921..3718d70ccf 100644 --- a/modules/luci-mod-status/htdocs/luci-static/resources/view/status/include/29_ports.js +++ b/modules/luci-mod-status/htdocs/luci-static/resources/view/status/include/29_ports.js @@ -210,7 +210,7 @@ function buildInterfaceMapping(zones, networks) { } function formatSpeed(carrier, speed, duplex) { - if (speed && duplex) { + if ((speed > 0) && duplex) { var d = (duplex == 'half') ? '\u202f(H)' : '', e = E('span', { 'title': _('Speed: %d Mibit/s, Duplex: %s').format(speed, duplex) }); -- 2.30.2