Skip to content

Commit

Permalink
Fix condition in TweetImageComponent template
Browse files Browse the repository at this point in the history
  • Loading branch information
dslucas committed Nov 28, 2022
1 parent 93e3160 commit 020025d
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/app/tweet-image/tweet-image.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -16,17 +16,17 @@

<ng-container *ngIf="tweet && thumbnail">
<span class="image-thumbnail"
*ngIf="tweet.extended_entities && tweet.extended_entities.media">
*ngIf="tweet.extended_entities?.media?.length">
<img [class.blur]="shouldBlur"
[src]="tweet.extended_entities.media[0].media_url" [alt]="shouldBlur ? 'Blurred image from tweet.' : 'Image from tweet.'">
</span>
</ng-container>
<ng-container *ngIf="tweet && !thumbnail">
<div class="full-image"
[class.collapsed]="collapsed"
*ngIf="tweet.extended_entities && tweet.extended_entities.media">
*ngIf="tweet.extended_entities?.media?.length">
<img *ngFor="let media of tweet.extended_entities.media"
[class.blur]="shouldBlur"
[class.blur]="shouldBlur"
[src]="media.media_url" [alt]="shouldBlur ? 'Blurred image from tweet.' : 'Image from tweet.'">
</div>
</ng-container>

0 comments on commit 020025d

Please sign in to comment.