Skip to content

Commit

Permalink
fix: click card view link to 404 page when card rendering(apache#15526)
Browse files Browse the repository at this point in the history
  • Loading branch information
xiezhongfu authored Jul 5, 2021
1 parent 2cb13e6 commit b20293d
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion superset-frontend/src/components/ListViewCard/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ interface LinkProps {
}

const AnchorLink: React.FC<LinkProps> = ({ to, children }) => (
<a href={to}>{children}</a>
<a {...(to ? { href: to } : {})}>{children}</a>
);

interface CardProps {
Expand Down
2 changes: 1 addition & 1 deletion superset-frontend/src/views/CRUD/chart/ChartCard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ export default function ChartCard({
return (
<CardStyles
onClick={() => {
if (!bulkSelectEnabled) {
if (!bulkSelectEnabled && chart.url) {
window.location.href = chart.url;
}
}}
Expand Down

0 comments on commit b20293d

Please sign in to comment.