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.
This commit is contained in:
damencho 2019-08-13 14:59:41 +03:00 committed by Дамян Минков
parent c0a8a386a5
commit 2ded8363ad
1 changed files with 5 additions and 1 deletions

View File

@ -2544,7 +2544,11 @@ export default {
leaveRoomAndDisconnect() {
APP.store.dispatch(conferenceWillLeave(room));
return room.leave().then(disconnect, disconnect);
if (room.isJoined()) {
return room.leave().then(disconnect, disconnect);
}
return disconnect();
},
/**