From b20293d1b1233c90c90cddd46da4d62fa054db55 Mon Sep 17 00:00:00 2001 From: gordern <458957068@qq.com> Date: Mon, 5 Jul 2021 13:55:41 +0800 Subject: [PATCH] fix: click card view link to 404 page when card rendering(#15526) --- superset-frontend/src/components/ListViewCard/index.tsx | 2 +- superset-frontend/src/views/CRUD/chart/ChartCard.tsx | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/superset-frontend/src/components/ListViewCard/index.tsx b/superset-frontend/src/components/ListViewCard/index.tsx index fad515110c..a68974597f 100644 --- a/superset-frontend/src/components/ListViewCard/index.tsx +++ b/superset-frontend/src/components/ListViewCard/index.tsx @@ -137,7 +137,7 @@ interface LinkProps { } const AnchorLink: React.FC = ({ to, children }) => ( - {children} + {children} ); interface CardProps { diff --git a/superset-frontend/src/views/CRUD/chart/ChartCard.tsx b/superset-frontend/src/views/CRUD/chart/ChartCard.tsx index 4a04638794..139b922a3d 100644 --- a/superset-frontend/src/views/CRUD/chart/ChartCard.tsx +++ b/superset-frontend/src/views/CRUD/chart/ChartCard.tsx @@ -134,7 +134,7 @@ export default function ChartCard({ return ( { - if (!bulkSelectEnabled) { + if (!bulkSelectEnabled && chart.url) { window.location.href = chart.url; } }}