Apply null-guard to room pills for when we can't fetch the room
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
This commit is contained in:
parent
744826db48
commit
e799691573
2 changed files with 4 additions and 2 deletions
|
@ -102,6 +102,8 @@ export function getInitialLetter(name) {
|
|||
}
|
||||
|
||||
export function avatarUrlForRoom(room, width, height, resizeMethod) {
|
||||
if (!room) return null; // null-guard
|
||||
|
||||
const explicitRoomAvatar = room.getAvatarUrl(
|
||||
MatrixClientPeg.get().getHomeserverUrl(),
|
||||
width,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue