ソースを参照

few tweaks to fix some exceptions in edge

master
bbaldino 7年前
コミット
f616b0b71b

+ 6
- 3
modules/UI/videolayout/VideoContainer.js ファイルの表示

@@ -626,8 +626,11 @@ export class VideoContainer extends LargeContainer {
626 626
         // the environment words the report. To reduce the risk of scaring a
627 627
         // developer, make sure that the rejection is handled. We cannot really
628 628
         // do anything substantial about the rejection and, more importantly, we
629
-        // do not care.
630
-        this.$videoBackground[0].play()
631
-            .catch(reason => logger.error(reason));
629
+        // do not care. Some browsers (at this time, only Edge is known) don't
630
+        // return a promise from .play(), so check before trying to catch.
631
+        const res = this.$videoBackground[0].play();
632
+        if (typeof res !== 'undefined') {
633
+            res.catch(reason => logger.error(reason));
634
+        }
632 635
     }
633 636
 }

+ 8
- 0
react/features/connection-stats/components/ConnectionStatsTable.js ファイルの表示

@@ -476,6 +476,10 @@ class ConnectionStatsTable extends Component {
476 476
  * @returns {string}
477 477
  */
478 478
 function getIP(value) {
479
+    if (!value) {
480
+        return '';
481
+    }
482
+
479 483
     return value.substring(0, value.lastIndexOf(':'));
480 484
 }
481 485
 
@@ -488,6 +492,10 @@ function getIP(value) {
488 492
  * @returns {string}
489 493
  */
490 494
 function getPort(value) {
495
+    if (!value) {
496
+        return '';
497
+    }
498
+
491 499
     return value.substring(value.lastIndexOf(':') + 1, value.length);
492 500
 }
493 501
 

読み込み中…
キャンセル
保存