Skip to content
Snippets Groups Projects
Commit 5222684a authored by Tom Käsler's avatar Tom Käsler
Browse files

Add nullchecks for empty comments

parent 8d558244
Branches patch-2
Tags
1 merge request!208Fix long loading
Pipeline #27016 passed with stages
in 6 minutes and 20 seconds
...@@ -12,12 +12,12 @@ ...@@ -12,12 +12,12 @@
<span class="fill-remaining-space"></span> <span class="fill-remaining-space"></span>
<div class="button-bar" fxLayoutAlign="center center"> <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 }}"> [matMenuTriggerFor]="filterMenu" matTooltip="{{ 'comment-list.filter-comments' | translate }}">
<mat-icon class="searchBarIcon">filter_list</mat-icon> <mat-icon class="searchBarIcon">filter_list</mat-icon>
</button> </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 }}"> [matMenuTriggerFor]="sortMenu" matTooltip="{{ 'comment-list.sort-comments' | translate }}">
<mat-icon class="searchBarIcon">sort</mat-icon> <mat-icon class="searchBarIcon">sort</mat-icon>
</button> </button>
...@@ -71,6 +71,6 @@ ...@@ -71,6 +71,6 @@
<app-comment *ngFor="let current of hideCommentsList ? filteredComments : comments" [comment]="current" [parseVote]="getVote(current)"></app-comment> <app-comment *ngFor="let current of hideCommentsList ? filteredComments : comments" [comment]="current" [parseVote]="getVote(current)"></app-comment>
</div> </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> <h4>{{ 'comment-page.no-comments' | translate }}</h4>
</div> </div>
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