diff --git a/src/components/views/messages/SenderProfile.js b/src/components/views/messages/SenderProfile.js index 5ca2fc6ed8..70c9c711fc 100644 --- a/src/components/views/messages/SenderProfile.js +++ b/src/components/views/messages/SenderProfile.js @@ -72,14 +72,12 @@ export default React.createClass({ _updateRelatedGroups() { if (this.unmounted) return; - const relatedGroupsEvent = this.context.matrixClient - .getRoom(this.props.mxEvent.getRoomId()) - .currentState - .getStateEvents('m.room.related_groups', ''); + const room = this.context.matrixClient.getRoom(this.props.mxEvent.getRoomId()); + if (!room) return; + + const relatedGroupsEvent = room.currentState.getStateEvents('m.room.related_groups', ''); this.setState({ - relatedGroups: relatedGroupsEvent ? - relatedGroupsEvent.getContent().groups || [] - : [], + relatedGroups: relatedGroupsEvent ? relatedGroupsEvent.getContent().groups || [] : [], }); }, diff --git a/src/components/views/rooms/EventTile.js b/src/components/views/rooms/EventTile.js index aa2f28024e..537545c904 100644 --- a/src/components/views/rooms/EventTile.js +++ b/src/components/views/rooms/EventTile.js @@ -621,13 +621,14 @@ module.exports = withMatrixClient(React.createClass({ switch (this.props.tileShape) { case 'notif': { + const EmojiText = sdk.getComponent('elements.EmojiText'); const room = this.props.matrixClient.getRoom(this.props.mxEvent.getRoomId()); return (