[master] browse repositories: fix infinite loading when the response is an empty array

This commit is contained in:
Alex Martzios 2024-01-03 10:50:05 +02:00
parent ed6f71c98f
commit a41bd71792
2 changed files with 4 additions and 3 deletions

View File

@ -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<Observable<any>> = new Array();
let obs: Observable<any>[] = [];
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 {

@ -1 +1 @@
Subproject commit 1979f5ec89ca960bf7c927a933a160854ae680b3
Subproject commit ee22e97b114be823b7ab4e6c41a9cbff93b24e3a