]> cat aescling's git repositories - mastodon.git/commitdiff
Fix content warning button displaying a link icon when no status card is set
authorThibaut Girka <thib@sitedethib.com>
Sun, 5 May 2019 19:09:45 +0000 (21:09 +0200)
committerThibG <thib@sitedethib.com>
Sun, 5 May 2019 19:47:05 +0000 (21:47 +0200)
app/javascript/flavours/glitch/features/status/components/detailed_status.js

index 0b162ed365e1b728f6d7da43c3a34a5410565309..03d98fde859d0d22efd8dfcee40af179f8a23c36 100644 (file)
@@ -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';
     }