Merge pull request #5914 from matrix-org/jryans/forget-room-error

Check for null room in `VisibilityProvider`
pull/21833/head
J. Ryan Stinnett 2021-04-26 10:36:21 +01:00 committed by GitHub
commit dda18c9384
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 5 additions and 1 deletions

View File

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