diff --git a/src/app/stats/stats.component.ts b/src/app/stats/stats.component.ts index 04a0ff8e2256a0dde66fa3f4626f4c70a392f3c2..c72b29ad2e4c1a6435240e6293f2d7a93e206519 100644 --- a/src/app/stats/stats.component.ts +++ b/src/app/stats/stats.component.ts @@ -94,10 +94,16 @@ export class StatsComponent implements OnInit { } getTitleFromFdpApi(fdpApiResponse: MetaModel): string { + let title = ''; if (fdpApiResponse) { - return Object.values(fdpApiResponse.path)[1]['title']; + Object.values(fdpApiResponse.path).forEach(e => { + if ( e.parent !== null) { + title = e.title; + } + } + ); } - return ''; + return title; } getCountDatasetByCatalog(fdpApiResponse: MetaModel): number {