mirror of
https://github.com/vector-im/element-web.git
synced 2024-11-16 13:14:58 +08:00
guard against empty roomId/non-existant room
This commit is contained in:
parent
302b3ad0e9
commit
7244d30c9c
@ -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 =
|
||||
|
Loading…
Reference in New Issue
Block a user