diff --git a/src/components/views/rooms/MemberList.js b/src/components/views/rooms/MemberList.js index b5fe0cfbc1..5478a725ff 100644 --- a/src/components/views/rooms/MemberList.js +++ b/src/components/views/rooms/MemberList.js @@ -424,7 +424,7 @@ module.exports = React.createClass({ const cli = MatrixClientPeg.get(); const room = cli.getRoom(this.props.roomId); let inviteButton; - if (room.getMyMembership() === 'join') { + if (room && room.getMyMembership() === 'join') { const TintableSvg = sdk.getComponent("elements.TintableSvg"); const AccessibleButton = sdk.getComponent("elements.AccessibleButton"); inviteButton =