Fix content warning button displaying a link icon when no status card is set

th-downstream
Thibaut Girka 5 years ago committed by ThibG
parent 1592cab613
commit 5052b8c29f

@ -112,7 +112,7 @@ export default class DetailedStatus extends ImmutablePureComponent {
return null;
}
let media = '';
let media = null;
let mediaIcon = null;
let applicationLink = '';
let reblogLink = '';
@ -163,8 +163,8 @@ export default class DetailedStatus extends ImmutablePureComponent {
);
mediaIcon = 'picture-o';
}
} else {
media = <Card onOpenMedia={this.props.onOpenMedia} card={status.get('card', null)} />;
} else if (status.get('card')) {
media = <Card onOpenMedia={this.props.onOpenMedia} card={status.get('card')} />;
mediaIcon = 'link';
}

Loading…
Cancel
Save