소스 검색

Fixes JS error on unload

master
hristoterezov 10 년 전
부모
커밋
11e50d1d85
3개의 변경된 파일3개의 추가작업 그리고 3개의 파일을 삭제
  1. 1
    1
      JitsiConference.js
  2. 1
    1
      doc/example/example.js
  3. 1
    1
      lib-jitsi-meet.js

+ 1
- 1
JitsiConference.js 파일 보기

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

+ 1
- 1
doc/example/example.js 파일 보기

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

+ 1
- 1
lib-jitsi-meet.js 파일 보기

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

Loading…
취소
저장