From a41bd7179275cd42a323c07f7612d19078777529 Mon Sep 17 00:00:00 2001 From: Alex Martzios Date: Wed, 3 Jan 2024 10:50:05 +0200 Subject: [PATCH] [master] browse repositories: fix infinite loading when the response is an empty array --- .../browse-repositories/browse-repositories.component.ts | 5 +++-- src/assets/common-assets | 2 +- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/src/app/repository/browse-repositories/browse-repositories.component.ts b/src/app/repository/browse-repositories/browse-repositories.component.ts index be0656e..94ccce5 100644 --- a/src/app/repository/browse-repositories/browse-repositories.component.ts +++ b/src/app/repository/browse-repositories/browse-repositories.component.ts @@ -54,6 +54,7 @@ export class BrowseRepositoriesComponent extends BrowseStakeholderBaseComponent case 'leastRecent': this.stakeholders = this.stakeholders.sort((a, b) => Number(a['creationDate']) - Number(b['creationDate'])); this.afterStakeholdersInitialized(); + break; default: break; } @@ -61,7 +62,7 @@ export class BrowseRepositoriesComponent extends BrowseStakeholderBaseComponent afterStakeholdersInitialized() { let currentFilteredStakeholders = this.filteredStakeholders.slice((this.currentPage-1)*this.pageSize, this.currentPage*this.pageSize); - let obs: Array> = new Array(); + let obs: Observable[] = []; currentFilteredStakeholders.forEach(item => { if(!item.details) { this.showLoading = true; @@ -81,9 +82,9 @@ export class BrowseRepositoriesComponent extends BrowseStakeholderBaseComponent currentFilteredStakeholders[index].details = item[0]; currentFilteredStakeholders[index].details['title']['name'] = currentFilteredStakeholders[index].name; }); - this.showLoading = false; } )); + this.showLoading = false; } public getResultPreview(result: SearchResult): ResultPreview { diff --git a/src/assets/common-assets b/src/assets/common-assets index 1979f5e..ee22e97 160000 --- a/src/assets/common-assets +++ b/src/assets/common-assets @@ -1 +1 @@ -Subproject commit 1979f5ec89ca960bf7c927a933a160854ae680b3 +Subproject commit ee22e97b114be823b7ab4e6c41a9cbff93b24e3a