mirror of https://github.com/vector-im/riot-web
Fix NPE when searching for rooms
Regressed by https://github.com/matrix-org/matrix-react-sdk/pull/3751pull/21833/head
parent
e9658a9e9e
commit
98571d706f
|
@ -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} />;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue