fix NPE on events with no sender object

pull/21833/head
Matthew Hodgson 2016-03-18 16:33:22 +00:00
parent d0ecd38927
commit 12db0d9130
1 changed files with 2 additions and 1 deletions

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(),
});
},