Skip to content

Commit

Permalink
Check if Steam profile is defined in thread.component.html.
Browse files Browse the repository at this point in the history
  • Loading branch information
izdwuut committed Feb 17, 2020
1 parent 4fbf9ef commit 7748414
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
6 changes: 3 additions & 3 deletions frontend/src/app/thread/thread.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ <h1>Scrapped comments</h1>
<mat-card-subtitle>
Comment karma: {{ comment.author.karma }}<span *ngIf='getAge(comment.author.age)'>, age: {{ getAge(comment.author.age) }}</span><br />
<div *ngIf='comment.entering'>
<div *ngIf='comment.steamProfile.steamId'>
<div *ngIf='comment.steamProfile && comment.steamProfile.steamId'>
<a href="https://steamcommunity.com/profiles/{{ comment.steamProfile.steamId }}/"
target="_blank">Steam profile</a>: {{ getSteamProfile(comment) }}
</div>
Expand All @@ -59,7 +59,7 @@ <h1>Scrapped comments</h1>
</mat-card-title>
<mat-card-subtitle>
Comment karma: {{ comment.author.karma }}<span *ngIf='getAge(comment.author.age)'>, age: {{ getAge(comment.author.age) }}</span><br />
<div *ngIf='comment.steamProfile.steamId'>
<div *ngIf='comment.steamProfile && comment.steamProfile.steamId'>
<a href="https://steamcommunity.com/profiles/{{ comment.steamProfile.steamId }}/"
target="_blank">Steam profile</a>: {{ getSteamProfile(comment) }}
</div>
Expand Down Expand Up @@ -94,7 +94,7 @@ <h1>Scrapped comments</h1>
</mat-card-title>
<mat-card-subtitle>
Comment karma: {{ comment.author.karma }}<span *ngIf='getAge(comment.author.age)'>, age: {{ getAge(comment.author.age) }}</span><br /><br />
<div *ngIf='comment.steamProfile.steamId'>
<div *ngIf='comment.steamProfile && comment.steamProfile.steamId'>
<a href="https://steamcommunity.com/profiles/{{ comment.steamProfile.steamId }}/"
target="_blank">Steam profile</a>: {{ getSteamProfile(comment) }}
</div>
Expand Down
1 change: 1 addition & 0 deletions frontend/src/app/thread/thread.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ export class ThreadComponent implements OnInit, OnDestroy {
sessionStorage.setItem('thread', JSON.stringify(thread))
if (!this.comments) {
this.commentsSubscription = this.rest.getCachedComments(thread).subscribe(results => {
console.log(results)
this.comments = results
sessionStorage.setItem('comments', JSON.stringify(results))
})
Expand Down

0 comments on commit 7748414

Please sign in to comment.