diff options
author | Thibaut Girka <thib@sitedethib.com> | 2019-05-05 21:09:45 +0200 |
---|---|---|
committer | ThibG <thib@sitedethib.com> | 2019-05-05 21:47:05 +0200 |
commit | 89d2859296bc5a57a8db07be86239cc938a3f691 (patch) | |
tree | 00fb6fc423d44c799c7094cb6c9c61d9e81eb531 /app/javascript | |
parent | 8383222026354d97560825c23ed115b3c0ce3574 (diff) |
Fix content warning button displaying a link icon when no status card is set
Diffstat (limited to 'app/javascript')
-rw-r--r-- | app/javascript/flavours/glitch/features/status/components/detailed_status.js | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/app/javascript/flavours/glitch/features/status/components/detailed_status.js b/app/javascript/flavours/glitch/features/status/components/detailed_status.js index 0b162ed36..03d98fde8 100644 --- a/app/javascript/flavours/glitch/features/status/components/detailed_status.js +++ b/app/javascript/flavours/glitch/features/status/components/detailed_status.js @@ -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'; } |