Merge pull request #3787 from matrix-org/travis/membership-tile

Fix NPE when filtering the room list
pull/21833/head
Travis Ralston 2019-12-27 11:37:38 -07:00 committed by GitHub
commit 6ef6b5909f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 1 deletions

View File

@ -380,7 +380,8 @@ module.exports = createReactClass({
/>; />;
const { room } = this.props; const { room } = this.props;
if (room.getMember(dmUserId).membership === "join" && room.getJoinedMemberCount() === 2) { const member = room.getMember(dmUserId);
if (member && member.membership === "join" && room.getJoinedMemberCount() === 2) {
const UserOnlineDot = sdk.getComponent('rooms.UserOnlineDot'); const UserOnlineDot = sdk.getComponent('rooms.UserOnlineDot');
dmOnline = <UserOnlineDot userId={dmUserId} />; dmOnline = <UserOnlineDot userId={dmUserId} />;
} }