Fix issue when a room without a name or alias is marked as suggested

pull/21833/head
Michael Telatynski 2021-05-19 10:46:11 +01:00
parent cf384c2a54
commit 78a8c9e10e
1 changed files with 1 additions and 1 deletions

View File

@ -428,7 +428,7 @@ export default class RoomList extends React.PureComponent<IProps, IState> {
private renderSuggestedRooms(): ReactComponentElement<typeof ExtraTile>[] {
return this.state.suggestedRooms.map(room => {
const name = room.name || room.canonical_alias || room.aliases.pop() || _t("Empty room");
const name = room.name || room.canonical_alias || room.aliases?.[0] || _t("Empty room");
const avatar = (
<RoomAvatar
oobData={{