More places where we assumed sender would not be null

This commit is contained in:
David Baker 2015-08-20 11:46:54 +01:00
parent cb25740961
commit 2351ad997c

View file

@ -69,11 +69,13 @@ module.exports = React.createClass({
var avatar, sender, resend; var avatar, sender, resend;
if (!this.props.continuation) { if (!this.props.continuation) {
avatar = ( if (this.props.mxEvent.sender) {
<div className="mx_MessageTile_avatar"> avatar = (
<MemberAvatar member={this.props.mxEvent.sender} /> <div className="mx_MessageTile_avatar">
</div> <MemberAvatar member={this.props.mxEvent.sender} />
); </div>
);
}
sender = <SenderProfile mxEvent={this.props.mxEvent} aux={aux} />; sender = <SenderProfile mxEvent={this.props.mxEvent} aux={aux} />;
} }
if (this.props.mxEvent.status === "not_sent" && !this.state.resending) { if (this.props.mxEvent.status === "not_sent" && !this.state.resending) {