Browse Source

Set default value for countriesOfSubscribers

pull/1682/head
Thomas 3 years ago
parent
commit
a0db77bd86
  1. 17
      apps/client/src/app/pages/landing/landing-page.component.ts

17
apps/client/src/app/pages/landing/landing-page.component.ts

@ -52,15 +52,16 @@ export class LandingPageComponent implements OnDestroy, OnInit {
private dataService: DataService, private dataService: DataService,
private deviceService: DeviceDetectorService private deviceService: DeviceDetectorService
) { ) {
const { countriesOfSubscribers, globalPermissions, statistics } = const {
this.dataService.fetchInfo(); countriesOfSubscribers = [],
globalPermissions,
statistics
} = this.dataService.fetchInfo();
if (countriesOfSubscribers) { for (const country of countriesOfSubscribers) {
for (const country of countriesOfSubscribers) { this.countriesOfSubscribersMap[country] = {
this.countriesOfSubscribersMap[country] = { value: 1
value: 1 };
};
}
} }
this.hasPermissionForStatistics = hasPermission( this.hasPermissionForStatistics = hasPermission(

Loading…
Cancel
Save