fix NPE on events with no sender object

This commit is contained in:
Matthew Hodgson 2016-03-18 16:33:22 +00:00
parent d0ecd38927
commit 12db0d9130

View file

@ -276,9 +276,10 @@ module.exports = React.createClass({
},
onSenderProfileClick: function(event) {
var mxEvent = this.props.mxEvent;
dispatcher.dispatch({
action: 'insert_displayname',
displayname: this.props.mxEvent.sender.name,
displayname: mxEvent.sender ? mxEvent.sender.name : mxEvent.getSender(),
});
},