guard against empty roomId/non-existant room

pull/21833/head
Bruno Windels 2018-10-24 16:44:18 +02:00
parent 302b3ad0e9
commit 7244d30c9c
1 changed files with 1 additions and 1 deletions

View File

@ -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 =