From ce6634beb19fdeeb0e92f70e554c8abc1d643e5c Mon Sep 17 00:00:00 2001 From: Emiliano Ciavatta Date: Fri, 25 Dec 2020 15:48:57 +0100 Subject: Fix error in stats page --- frontend/src/components/panels/StatsPane.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'frontend/src/components') diff --git a/frontend/src/components/panels/StatsPane.js b/frontend/src/components/panels/StatsPane.js index dd774d0..a35ef0c 100644 --- a/frontend/src/components/panels/StatsPane.js +++ b/frontend/src/components/panels/StatsPane.js @@ -80,7 +80,7 @@ class StatsPane extends Component { const s = this.state.stats; const rs = this.state.resourcesStats; - const ports = s ? Object.keys(s["connections_per_service"]) : []; + const ports = s && s["connections_per_service"] ? Object.keys(s["connections_per_service"]) : []; let connections = 0, clientBytes = 0, serverBytes = 0, totalBytes = 0, duration = 0; let servicesStats = ports.map((port) => { connections += s["connections_per_service"][port]; -- cgit v1.2.3-70-g09d2