From f8c395b1c7f413081e575f9a4c80768fe285ccfc Mon Sep 17 00:00:00 2001 From: Andres Martinez Gotor Date: Mon, 13 Apr 2020 16:57:13 +0200 Subject: [PATCH] Omit chart sources if they don't exist (#1661) --- dashboard/src/components/ChartView/ChartView.test.tsx | 1 - dashboard/src/components/ChartView/ChartView.tsx | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/dashboard/src/components/ChartView/ChartView.test.tsx b/dashboard/src/components/ChartView/ChartView.test.tsx index 1d3eca023bd..db6d33c5e14 100644 --- a/dashboard/src/components/ChartView/ChartView.test.tsx +++ b/dashboard/src/components/ChartView/ChartView.test.tsx @@ -29,7 +29,6 @@ const testChart: IChartVersion["relationships"]["chart"] = { repo: { name: "testrepo", }, - sources: [] as string[], }, } as IChartVersion["relationships"]["chart"]; diff --git a/dashboard/src/components/ChartView/ChartView.tsx b/dashboard/src/components/ChartView/ChartView.tsx index 8cc613e4bd1..4ca4e363218 100644 --- a/dashboard/src/components/ChartView/ChartView.tsx +++ b/dashboard/src/components/ChartView/ChartView.tsx @@ -110,7 +110,7 @@ class ChartView extends React.Component { githubIDAsNames={this.isKubernetesCharts(chartAttrs.repo.url)} /> - {chartAttrs.sources.length > 0 && ( + {chartAttrs.sources?.length > 0 && (

Related