From 85fd9238b1f4cb2b015e4a2806a7c0369f0303e9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=20K=C3=A4sler?= <tom.kaesler@mni.thm.de> Date: Sun, 9 Jun 2019 01:04:28 +0200 Subject: [PATCH] Add null check for vote input --- src/app/components/shared/comment/comment.component.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/app/components/shared/comment/comment.component.ts b/src/app/components/shared/comment/comment.component.ts index 00f446075..45ef3e5c5 100644 --- a/src/app/components/shared/comment/comment.component.ts +++ b/src/app/components/shared/comment/comment.component.ts @@ -76,7 +76,7 @@ export class CommentComponent implements OnInit { @Input() set parseVote(vote: Vote) { - if (this.isStudent) { + if (vote) { this.hasVoted = vote.vote; } } -- GitLab