Check for null room in `VisibilityProvider`

Hopefully fixes https://github.com/vector-im/element-web/issues/16898
pull/21833/head
J. Ryan Stinnett 2021-04-23 17:24:13 +01:00
parent 65d55bd0d9
commit 3d41b48543
1 changed files with 5 additions and 1 deletions

View File

@ -37,7 +37,11 @@ export class VisibilityProvider {
await VoipUserMapper.sharedInstance().onNewInvitedRoom(room); await VoipUserMapper.sharedInstance().onNewInvitedRoom(room);
} }
public isRoomVisible(room: Room): boolean { public isRoomVisible(room?: Room): boolean {
if (!room) {
return false;
}
if ( if (
CallHandler.sharedInstance().getSupportsVirtualRooms() && CallHandler.sharedInstance().getSupportsVirtualRooms() &&
VoipUserMapper.sharedInstance().isVirtualRoom(room) VoipUserMapper.sharedInstance().isVirtualRoom(room)