guard against empty roomId/non-existant room

This commit is contained in:
Bruno Windels 2018-10-24 16:44:18 +02:00
parent 302b3ad0e9
commit 7244d30c9c

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 =