fix: Handles the case of e2eRtt being undefined. (#3354)

This commit is contained in:
bgrozev 2018-08-07 20:39:10 -05:00 committed by virtuacoplenny
parent 2ee1bf9351
commit 2f1223f721
1 changed files with 5 additions and 1 deletions

View File

@ -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 (
<tr>