Merge pull request #4903 from matrix-org/t3chguy/room-list/14353

null-guard against groups with a null name in new Room List
This commit is contained in:
Michael Telatynski 2020-07-06 22:01:41 +01:00 committed by GitHub
commit f038dd52e6
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -190,7 +190,7 @@ export default class RoomList2 extends React.Component<IProps, IState> {
// TODO: Put community invites in a more sensible place (not in the room list) // TODO: Put community invites in a more sensible place (not in the room list)
return MatrixClientPeg.get().getGroups().filter(g => { return MatrixClientPeg.get().getGroups().filter(g => {
if (g.myMembership !== 'invite') return false; if (g.myMembership !== 'invite') return false;
return !this.searchFilter || this.searchFilter.matches(g.name); return !this.searchFilter || this.searchFilter.matches(g.name || "");
}).map(g => { }).map(g => {
const avatar = ( const avatar = (
<GroupAvatar <GroupAvatar