Przeglądaj źródła

Fixes JS error on unload

master
hristoterezov 10 lat temu
rodzic
commit
11e50d1d85
3 zmienionych plików z 3 dodań i 3 usunięć
  1. 1
    1
      JitsiConference.js
  2. 1
    1
      doc/example/example.js
  3. 1
    1
      lib-jitsi-meet.js

+ 1
- 1
JitsiConference.js Wyświetl plik

55
  * Leaves the conference.
55
  * Leaves the conference.
56
  */
56
  */
57
 JitsiConference.prototype.leave = function () {
57
 JitsiConference.prototype.leave = function () {
58
-    if(this.xmpp)
58
+    if(this.xmpp && this.room)
59
         this.xmpp.leaveRoom(this.room.roomjid);
59
         this.xmpp.leaveRoom(this.room.roomjid);
60
     this.room = null;
60
     this.room = null;
61
 };
61
 };

+ 1
- 1
doc/example/example.js Wyświetl plik

133
 }
133
 }
134
 
134
 
135
 function unload() {
135
 function unload() {
136
-//    room.leave();
136
+   room.leave();
137
     connection.disconnect();
137
     connection.disconnect();
138
 }
138
 }
139
 
139
 

+ 1
- 1
lib-jitsi-meet.js Wyświetl plik

57
  * Leaves the conference.
57
  * Leaves the conference.
58
  */
58
  */
59
 JitsiConference.prototype.leave = function () {
59
 JitsiConference.prototype.leave = function () {
60
-    if(this.xmpp)
60
+    if(this.xmpp && this.room)
61
         this.xmpp.leaveRoom(this.room.roomjid);
61
         this.xmpp.leaveRoom(this.room.roomjid);
62
     this.room = null;
62
     this.room = null;
63
 };
63
 };

Ładowanie…
Anuluj
Zapisz