fix: prevent page crash when chart can't render (#16464)
(cherry picked from commit 577ede4b125d4ce86eb711f99602948ef0d50d94)
diff --git a/superset-frontend/src/explore/components/DataTablesPane/index.tsx b/superset-frontend/src/explore/components/DataTablesPane/index.tsx
index 4a1172d..98792c8 100644
--- a/superset-frontend/src/explore/components/DataTablesPane/index.tsx
+++ b/superset-frontend/src/explore/components/DataTablesPane/index.tsx
@@ -224,7 +224,7 @@
}, [queryFormData.adhoc_filters, queryFormData.datasource]);
useEffect(() => {
- if (queriesResponse) {
+ if (queriesResponse && chartStatus === 'success') {
const { colnames } = queriesResponse[0];
setColumnNames([...colnames]);
}