aboutsummaryrefslogtreecommitdiff
path: root/src/app/components/post/post.component.ts
diff options
context:
space:
mode:
Diffstat (limited to 'src/app/components/post/post.component.ts')
-rw-r--r--src/app/components/post/post.component.ts4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/app/components/post/post.component.ts b/src/app/components/post/post.component.ts
index f0d8a44..e1e593a 100644
--- a/src/app/components/post/post.component.ts
+++ b/src/app/components/post/post.component.ts
@@ -105,6 +105,10 @@ export class PostComponent implements OnInit, AfterViewInit {
ngAfterViewInit(): void {
this._ratingServe.getRatingByUserAndPostWithSessionStorageRequest(Guid.parse(this.paramId)).subscribe({
next: (x: object) => {
+ if (!x) {
+ return;
+ }
+
const isLike: boolean = Object.values(x)[3];
this.changeColorOfVoteButton(isLike, !isLike);