Przeglądaj źródła

Merge pull request #299 from jitsi/msg_for_missing_participant

Fix Uncaught TypeError: Cannot read property 'getTracks' of undefined
dev1
hristoterezov 9 lat temu
rodzic
commit
7caf4542d6
1 zmienionych plików z 10 dodań i 3 usunięć
  1. 10
    3
      JitsiConferenceEventManager.js

+ 10
- 3
JitsiConferenceEventManager.js Wyświetl plik

@@ -481,9 +481,16 @@ JitsiConferenceEventManager.prototype.setupRTCListeners = function () {
481 481
 
482 482
     conference.rtc.addListener(RTCEvents.ENDPOINT_MESSAGE_RECEIVED,
483 483
         function (from, payload) {
484
-            conference.eventEmitter.emit(
485
-                JitsiConferenceEvents.ENDPOINT_MESSAGE_RECEIVED,
486
-                conference.getParticipantById(from), payload);
484
+            const participant = conference.getParticipantById(from);
485
+            if (participant) {
486
+                conference.eventEmitter.emit(
487
+                    JitsiConferenceEvents.ENDPOINT_MESSAGE_RECEIVED,
488
+                    participant, payload);
489
+            } else {
490
+                logger.warn(
491
+                    "Ignored ENDPOINT_MESSAGE_RECEIVED " +
492
+                    "for not existing participant: " + from, payload);
493
+            }
487 494
         });
488 495
 };
489 496
 

Ładowanie…
Anuluj
Zapisz