1
0
mirror of https://github.com/matrix-org/matrix-react-sdk.git synced 2025-11-07 10:46:24 +03:00

Merge pull request #6064 from matrix-org/t3chguy/fix/rs5084

Fix issue when a room without a name or alias is marked as suggested
This commit is contained in:
Michael Telatynski
2021-05-19 12:28:41 +01:00
committed by GitHub

View File

@@ -428,7 +428,7 @@ export default class RoomList extends React.PureComponent<IProps, IState> {
private renderSuggestedRooms(): ReactComponentElement<typeof ExtraTile>[] { private renderSuggestedRooms(): ReactComponentElement<typeof ExtraTile>[] {
return this.state.suggestedRooms.map(room => { 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 = ( const avatar = (
<RoomAvatar <RoomAvatar
oobData={{ oobData={{