diff --git a/superset-frontend/src/explore/components/DataTablesPane/index.tsx b/superset-frontend/src/explore/components/DataTablesPane/index.tsx index 67a07f905f..3771c62655 100644 --- a/superset-frontend/src/explore/components/DataTablesPane/index.tsx +++ b/superset-frontend/src/explore/components/DataTablesPane/index.tsx @@ -305,7 +305,7 @@ export const DataTablesPane = ({ const { colnames } = queriesResponse[0]; setColumnNames({ ...columnNames, - [RESULT_TYPES.results]: [...colnames], + [RESULT_TYPES.results]: colnames ? [...colnames] : [], }); } }, [queriesResponse]);