浏览代码

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

master
bgrozev 7 年前
父节点
当前提交
2f1223f721
共有 1 个文件被更改,包括 5 次插入1 次删除
  1. 5
    1
      react/features/connection-stats/components/ConnectionStatsTable.js

+ 5
- 1
react/features/connection-stats/components/ConnectionStatsTable.js 查看文件

227
      */
227
      */
228
     _renderE2eRtt() {
228
     _renderE2eRtt() {
229
         const { e2eRtt, region, t } = this.props;
229
         const { e2eRtt, region, t } = this.props;
230
-        const str = `${e2eRtt.toFixed(0)}ms (${region ? region : 'unknown'})`;
230
+        let str = e2eRtt ? `${e2eRtt.toFixed(0)}ms` : 'N/A';
231
+
232
+        if (region) {
233
+            str += ` (${region})`;
234
+        }
231
 
235
 
232
         return (
236
         return (
233
             <tr>
237
             <tr>

正在加载...
取消
保存