avoid racey NPE on first login
This commit is contained in:
parent
842d6b6c2c
commit
b1b2704bed
1 changed files with 2 additions and 1 deletions
|
@ -43,12 +43,13 @@ module.exports = React.createClass({
|
||||||
|
|
||||||
render: function() {
|
render: function() {
|
||||||
var myUserId = MatrixClientPeg.get().credentials.userId;
|
var myUserId = MatrixClientPeg.get().credentials.userId;
|
||||||
|
var me = this.props.room.currentState.members[myUserId];
|
||||||
var classes = classNames({
|
var classes = classNames({
|
||||||
'mx_RoomTile': true,
|
'mx_RoomTile': true,
|
||||||
'mx_RoomTile_selected': this.props.selected,
|
'mx_RoomTile_selected': this.props.selected,
|
||||||
'mx_RoomTile_unread': this.props.unread,
|
'mx_RoomTile_unread': this.props.unread,
|
||||||
'mx_RoomTile_highlight': this.props.highlight,
|
'mx_RoomTile_highlight': this.props.highlight,
|
||||||
'mx_RoomTile_invited': this.props.room.currentState.members[myUserId].membership == 'invite'
|
'mx_RoomTile_invited': (me && me.membership == 'invite'),
|
||||||
});
|
});
|
||||||
|
|
||||||
var name;
|
var name;
|
||||||
|
|
Loading…
Reference in a new issue