Skip to content
This repository has been archived by the owner on Sep 11, 2024. It is now read-only.

Fix NPE when filtering the room list #3787

Merged
merged 1 commit into from
Dec 27, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion src/components/views/rooms/RoomTile.js
Original file line number Diff line number Diff line change
Expand Up @@ -380,7 +380,8 @@ module.exports = createReactClass({
/>;

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');
dmOnline = <UserOnlineDot userId={dmUserId} />;
}
Expand Down