From 88b15cb19b52c220865bb3c398890637bbc4842e Mon Sep 17 00:00:00 2001 From: "k.triantafyllou" Date: Fri, 30 Aug 2019 14:59:49 +0000 Subject: [PATCH] [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 --- src/app/pages/wellcome/wellcome.component.ts | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/app/pages/wellcome/wellcome.component.ts b/src/app/pages/wellcome/wellcome.component.ts index b55c395..f84f334 100644 --- a/src/app/pages/wellcome/wellcome.component.ts +++ b/src/app/pages/wellcome/wellcome.component.ts @@ -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++) {