From 51c207ed9b4ab7ad8e80b6484e703096710284c1 Mon Sep 17 00:00:00 2001 From: Abdelmalek Date: Tue, 21 Jun 2022 20:21:08 +0200 Subject: [PATCH] fix(links): display link when format is unknown --- .../src/lib/downloads-list/downloads-list.component.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/libs/ui/elements/src/lib/downloads-list/downloads-list.component.ts b/libs/ui/elements/src/lib/downloads-list/downloads-list.component.ts index 9c5985f7b4..8a183721be 100644 --- a/libs/ui/elements/src/lib/downloads-list/downloads-list.component.ts +++ b/libs/ui/elements/src/lib/downloads-list/downloads-list.component.ts @@ -54,6 +54,7 @@ export class DownloadsListComponent implements OnInit { ngOnInit(): void { this.processedLinks = this.formatLinks(this.links) + console.log(this.processedLinks) this.processedLinks = this.assignColor(this.processedLinks) this.processedLinks = this.isGeneratedFromWfs(this.processedLinks) this.filteredLinks = this.filterLinks(this.processedLinks) @@ -70,7 +71,7 @@ export class DownloadsListComponent implements OnInit { return links.map((link) => { return { ...link, - format: link.format.split(':').at(-1), + format: link.format ? link.format.split(':').at(-1) : '', } }) }