Skip to content

Commit 4000085

Browse files
committed
Fix errors with missing map initialization
1 parent c497a66 commit 4000085

3 files changed

Lines changed: 3 additions & 4 deletions

File tree

src/app/shared/browse-most-elements/browse-most-elements.component.html

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,9 +22,7 @@
2222
</ng-container>
2323

2424
</div>
25-
<div
26-
class="row justify-content-center"
27-
*ngIf="topSection.showAllResults && (discoveryConfigurationsTotalElementsMap === null || discoveryConfigurationsTotalElementsMap.get(paginatedSearchOptions.configuration) > 0)" class="d-flex justify-content-center">
25+
<div *ngIf="topSection?.showAllResults && (discoveryConfigurationsTotalElementsMap === null || discoveryConfigurationsTotalElementsMap.get(paginatedSearchOptions.configuration) > 0)" class="d-flex justify-content-center">
2826
<button type="button" class="btn btn-link" (click)="showAllResults()">
2927
{{ "home.top-section.view-results" | translate }}
3028
</button>

src/app/shared/browse-most-elements/browse-most-elements.component.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ export class BrowseMostElementsComponent implements OnInit, OnChanges {
8484

8585
@Input() topSection: TopSection;
8686

87-
@Input() discoveryConfigurationsTotalElementsMap: Map<string, number>;
87+
@Input() discoveryConfigurationsTotalElementsMap: Map<string, number> = new Map();
8888

8989

9090
paginatedSearchOptions$ = new BehaviorSubject<PaginatedSearchOptions>(null);

src/app/shared/browse-most-elements/images-browse-elements/images-browse-elements.component.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ import { AbstractBrowseElementsComponent } from '../abstract-browse-elements.com
3434
ThemedTypeBadgeComponent,
3535
RouterLink,
3636
NgxSkeletonLoaderModule,
37+
NgIf,
3738
NgForOf,
3839
NgIf,
3940
],

0 commit comments

Comments
 (0)