From d0501fc299d4a2ef98c98c1cdf74bfeb2a314059 Mon Sep 17 00:00:00 2001 From: Lukas Haase <lukas.haase@mni.thm.de> Date: Tue, 21 Jul 2020 13:26:20 +0200 Subject: [PATCH] resolve undefined id for comment component --- src/app/components/shared/comment/comment.component.html | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/app/components/shared/comment/comment.component.html b/src/app/components/shared/comment/comment.component.html index 5dbdc15ff..00e76cf6c 100644 --- a/src/app/components/shared/comment/comment.component.html +++ b/src/app/components/shared/comment/comment.component.html @@ -53,7 +53,8 @@ </mat-icon> </button> <button mat-icon-button - *ngIf="(isCreator || comment.creatorId === user.id) && !comment.favorite && !inAnswerView" (click)="openDeleteCommentDialog()" + *ngIf="(isCreator || (comment.creatorId && user && comment.creatorId === user.id)) && !comment.favorite && !inAnswerView" + (click)="openDeleteCommentDialog()" tabindex="0" attr.aria-labelledby="comment_delete{{ comment.id }}"> <mat-icon class="not-marked" matTooltip="{{ 'comment-page.delete' | translate }}">delete </mat-icon> -- GitLab