diff --git a/superset-frontend/src/chart/Chart.jsx b/superset-frontend/src/chart/Chart.jsx index 14657cc2ddeb7..6e1003f79a1cf 100644 --- a/superset-frontend/src/chart/Chart.jsx +++ b/superset-frontend/src/chart/Chart.jsx @@ -208,6 +208,7 @@ class Chart extends React.PureComponent { ) { return ( [ chartId, - // if render has failed, clear error message, - // which will trigger a re-render - chart.chartStatus === 'failed' + // some charts may not have properly handled missing datasource, + // causing a JS error, so we reset error message and try to re-render + // the chart once the datasource is fully loaded + chart.chartStatus === 'failed' && chart.chartStackTrace ? { ...chart, chartStatus: '',