瀏覽代碼

Leaves room only when it is already joined.

In case of hitting errors like max participant limit reached and when clicking hangup, the attempt to leave room second time results error and reload screen.
master
damencho 6 年之前
父節點
當前提交
2ded8363ad
共有 1 個檔案被更改,包括 5 行新增1 行删除
  1. 5
    1
      conference.js

+ 5
- 1
conference.js 查看文件

2544
     leaveRoomAndDisconnect() {
2544
     leaveRoomAndDisconnect() {
2545
         APP.store.dispatch(conferenceWillLeave(room));
2545
         APP.store.dispatch(conferenceWillLeave(room));
2546
 
2546
 
2547
-        return room.leave().then(disconnect, disconnect);
2547
+        if (room.isJoined()) {
2548
+            return room.leave().then(disconnect, disconnect);
2549
+        }
2550
+
2551
+        return disconnect();
2548
     },
2552
     },
2549
 
2553
 
2550
     /**
2554
     /**

Loading…
取消
儲存