fix: prevent page crash when chart can't render (#16464)

This commit is contained in:
Yongjie Zhao 2021-08-26 15:26:01 +01:00 committed by GitHub
parent c66d6d83b9
commit 577ede4b12
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -224,7 +224,7 @@ export const DataTablesPane = ({
}, [queryFormData.adhoc_filters, queryFormData.datasource]);
useEffect(() => {
if (queriesResponse) {
if (queriesResponse && chartStatus === 'success') {
const { colnames } = queriesResponse[0];
setColumnNames([...colnames]);
}