fix: return room lock conference, when there is no other

This commit is contained in:
Bettenbuk Zoltan 2019-11-20 11:57:18 +01:00 committed by Zoltan Bettenbuk
parent 34ccd3524f
commit 8f0a12016a
1 changed files with 7 additions and 5 deletions

View File

@ -178,13 +178,15 @@ export function getConferenceName(stateful: Function | Object): string {
* @returns {JitsiConference|undefined}
*/
export function getCurrentConference(stateful: Function | Object) {
const { conference, joining, leaving }
const { conference, joining, leaving, passwordRequired }
= toState(stateful)['features/base/conference'];
return (
conference
? conference === leaving ? undefined : conference
: joining);
// There is a precendence
if (conference) {
return conference === leaving ? undefined : conference;
}
return joining || passwordRequired;
}
/**