Guard against unexisting statuses rendering

lolsob-rspec
Eugen Rochko 2016-10-25 11:13:16 +02:00
parent 68535f58cd
commit 43905dd59a
1 changed files with 4 additions and 0 deletions

View File

@ -45,6 +45,10 @@ const Status = React.createClass({
let media = ''; let media = '';
let { status, ...other } = this.props; let { status, ...other } = this.props;
if (status === null) {
return <div />;
}
if (status.get('reblog', null) !== null && typeof status.get('reblog') === 'object') { if (status.get('reblog', null) !== null && typeof status.get('reblog') === 'object') {
let displayName = status.getIn(['account', 'display_name']); let displayName = status.getIn(['account', 'display_name']);