Commit 5222684a authored by Tom Käsler's avatar Tom Käsler

Add nullchecks for empty comments

parent 8d558244
Pipeline #27016 passed with stages
in 6 minutes and 20 seconds
......@@ -12,12 +12,12 @@
<span class="fill-remaining-space"></span>
<div class="button-bar" fxLayoutAlign="center center">
<button mat-icon-button class="searchBarButton" *ngIf="!searchBox.value && comments.length > 0"
<button mat-icon-button class="searchBarButton" *ngIf="!searchBox.value && comments && comments.length > 0"
[matMenuTriggerFor]="filterMenu" matTooltip="{{ 'comment-list.filter-comments' | translate }}">
<mat-icon class="searchBarIcon">filter_list</mat-icon>
</button>
<button mat-icon-button class="searchBarButton" *ngIf="!searchBox.value && comments.length > 0"
<button mat-icon-button class="searchBarButton" *ngIf="!searchBox.value && comments && comments.length > 0"
[matMenuTriggerFor]="sortMenu" matTooltip="{{ 'comment-list.sort-comments' | translate }}">
<mat-icon class="searchBarIcon">sort</mat-icon>
</button>
......@@ -71,6 +71,6 @@
<app-comment *ngFor="let current of hideCommentsList ? filteredComments : comments" [comment]="current" [parseVote]="getVote(current)"></app-comment>
</div>
<div *ngIf="comments.length < 1" fxLayout="row" fxLayoutAlign="center center" class="no-comments">
<div *ngIf="comments && comments.length < 1" fxLayout="row" fxLayoutAlign="center center" class="no-comments">
<h4>{{ 'comment-page.no-comments' | translate }}</h4>
</div>
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment