From 2f1223f7211bf8aec270136e8266052bcd973f08 Mon Sep 17 00:00:00 2001 From: bgrozev Date: Tue, 7 Aug 2018 20:39:10 -0500 Subject: [PATCH] fix: Handles the case of e2eRtt being undefined. (#3354) --- .../connection-stats/components/ConnectionStatsTable.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/react/features/connection-stats/components/ConnectionStatsTable.js b/react/features/connection-stats/components/ConnectionStatsTable.js index c9f1efd46..ec0b5cd1e 100644 --- a/react/features/connection-stats/components/ConnectionStatsTable.js +++ b/react/features/connection-stats/components/ConnectionStatsTable.js @@ -227,7 +227,11 @@ class ConnectionStatsTable extends Component { */ _renderE2eRtt() { const { e2eRtt, region, t } = this.props; - const str = `${e2eRtt.toFixed(0)}ms (${region ? region : 'unknown'})`; + let str = e2eRtt ? `${e2eRtt.toFixed(0)}ms` : 'N/A'; + + if (region) { + str += ` (${region})`; + } return (