mirror of
https://github.com/openwrt/luci.git
synced 2026-05-31 18:41:54 +08:00
luci-mod-status: gracefully handle missing port stats
Ref: https://github.com/openwrt/luci/commit/cba58fcafbe3a3f4f599354f7c123b546e045887#commitcomment-123043170
Fixes: 4e46624817 ("luci-mod-status: introduce ethernet port status view")
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
This commit is contained in:
+1
-1
@@ -217,7 +217,7 @@ function formatSpeed(speed, duplex) {
|
||||
}
|
||||
|
||||
function formatStats(portdev) {
|
||||
var stats = portdev._devstate('stats');
|
||||
var stats = portdev._devstate('stats') || {};
|
||||
|
||||
return ui.itemlist(E('span'), [
|
||||
_('Received bytes'), '%1024mB'.format(stats.rx_bytes),
|
||||
|
||||
Reference in New Issue
Block a user