nullguard SenderProfile,broke when NotifPanel had evs from forgotten rooms
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
This commit is contained in:
parent
aff2cc9065
commit
807d72f2d9
1 changed files with 5 additions and 7 deletions
|
@ -72,14 +72,12 @@ export default React.createClass({
|
||||||
|
|
||||||
_updateRelatedGroups() {
|
_updateRelatedGroups() {
|
||||||
if (this.unmounted) return;
|
if (this.unmounted) return;
|
||||||
const relatedGroupsEvent = this.context.matrixClient
|
const room = this.context.matrixClient.getRoom(this.props.mxEvent.getRoomId())
|
||||||
.getRoom(this.props.mxEvent.getRoomId())
|
if (!room) return;
|
||||||
.currentState
|
|
||||||
.getStateEvents('m.room.related_groups', '');
|
const relatedGroupsEvent = room.currentState.getStateEvents('m.room.related_groups', '');
|
||||||
this.setState({
|
this.setState({
|
||||||
relatedGroups: relatedGroupsEvent ?
|
relatedGroups: relatedGroupsEvent ? relatedGroupsEvent.getContent().groups || [] : [],
|
||||||
relatedGroupsEvent.getContent().groups || []
|
|
||||||
: [],
|
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue