diff --git a/apps/client/src/app/pages/landing/landing-page.component.ts b/apps/client/src/app/pages/landing/landing-page.component.ts index 90cb8d813..e2ad8a592 100644 --- a/apps/client/src/app/pages/landing/landing-page.component.ts +++ b/apps/client/src/app/pages/landing/landing-page.component.ts @@ -52,15 +52,16 @@ export class LandingPageComponent implements OnDestroy, OnInit { private dataService: DataService, private deviceService: DeviceDetectorService ) { - const { countriesOfSubscribers, globalPermissions, statistics } = - this.dataService.fetchInfo(); + const { + countriesOfSubscribers = [], + globalPermissions, + statistics + } = this.dataService.fetchInfo(); - if (countriesOfSubscribers) { - for (const country of countriesOfSubscribers) { - this.countriesOfSubscribersMap[country] = { - value: 1 - }; - } + for (const country of countriesOfSubscribers) { + this.countriesOfSubscribersMap[country] = { + value: 1 + }; } this.hasPermissionForStatistics = hasPermission(