[Admin]: Wellcome component: Add condition if communities is null exit from subscribe

git-svn-id: https://svn.driver.research-infrastructures.eu/driver/dnet40/modules/uoa-admin-portal/trunk@56942 d315682c-612b-4755-9ff5-7f18f6832af3
This commit is contained in:
k.triantafyllou 2019-08-30 14:59:49 +00:00
parent b6dff457a4
commit 88b15cb19b
1 changed files with 3 additions and 0 deletions

View File

@ -96,6 +96,9 @@ export class WellcomeComponent implements OnInit {
//this._communitiesService.getCommunities(this.properties, this.properties.communityAPI + 'communities').subscribe(
this._communitiesService.getCommunitiesState().subscribe(
communities => {
if (!communities || communities.length === 0) {
return;
}
var countCommunities = 0;
var index_managerOfCommunity = null;
for (var i = 0; i < communities.length; i++) {