[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:
parent
b6dff457a4
commit
88b15cb19b
|
@ -96,6 +96,9 @@ export class WellcomeComponent implements OnInit {
|
||||||
//this._communitiesService.getCommunities(this.properties, this.properties.communityAPI + 'communities').subscribe(
|
//this._communitiesService.getCommunities(this.properties, this.properties.communityAPI + 'communities').subscribe(
|
||||||
this._communitiesService.getCommunitiesState().subscribe(
|
this._communitiesService.getCommunitiesState().subscribe(
|
||||||
communities => {
|
communities => {
|
||||||
|
if (!communities || communities.length === 0) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
var countCommunities = 0;
|
var countCommunities = 0;
|
||||||
var index_managerOfCommunity = null;
|
var index_managerOfCommunity = null;
|
||||||
for (var i = 0; i < communities.length; i++) {
|
for (var i = 0; i < communities.length; i++) {
|
||||||
|
|
Loading…
Reference in New Issue