Skip to content

Commit

Permalink
Omit chart sources if they don't exist (#1661)
Browse files Browse the repository at this point in the history
  • Loading branch information
Andres Martinez Gotor authored Apr 13, 2020
1 parent 3b4bbae commit f8c395b
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 2 deletions.
1 change: 0 additions & 1 deletion dashboard/src/components/ChartView/ChartView.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@ const testChart: IChartVersion["relationships"]["chart"] = {
repo: {
name: "testrepo",
},
sources: [] as string[],
},
} as IChartVersion["relationships"]["chart"];

Expand Down
2 changes: 1 addition & 1 deletion dashboard/src/components/ChartView/ChartView.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ class ChartView extends React.Component<IChartViewProps> {
githubIDAsNames={this.isKubernetesCharts(chartAttrs.repo.url)}
/>
</div>
{chartAttrs.sources.length > 0 && (
{chartAttrs.sources?.length > 0 && (
<div className="ChartViewSidebar__section">
<h2>Related</h2>
<div className="ChartSources">
Expand Down

0 comments on commit f8c395b

Please sign in to comment.