Pārlūkot izejas kodu

fix: Fixes error for undefined error, on happening on p2p kick.

tags/v0.0.2
damencho 4 gadus atpakaļ
vecāks
revīzija
dddbab99f1
1 mainītis faili ar 2 papildinājumiem un 4 dzēšanām
  1. 2
    4
      JitsiConference.js

+ 2
- 4
JitsiConference.js Parādīt failu

2384
  * @public (FIXME how to make package local ?)
2384
  * @public (FIXME how to make package local ?)
2385
  */
2385
  */
2386
 JitsiConference.prototype.getActivePeerConnection = function() {
2386
 JitsiConference.prototype.getActivePeerConnection = function() {
2387
-    if (this.isP2PActive()) {
2388
-        return this.p2pJingleSession.peerconnection;
2389
-    }
2387
+    const session = this.isP2PActive() ? this.p2pJingleSession : this.jvbJingleSession;
2390
 
2388
 
2391
-    return this.jvbJingleSession ? this.jvbJingleSession.peerconnection : null;
2389
+    return session ? session.peerconnection : null;
2392
 };
2390
 };
2393
 
2391
 
2394
 /**
2392
 /**

Notiek ielāde…
Atcelt
Saglabāt