mirror of
https://github.com/openwrt/luci.git
synced 2025-12-26 13:26:20 +04:00
luci-mod-status: gracefully handle missing port stats
Ref:cba58fcafb (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:
@@ -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