mirror of
https://github.com/nocobase/nocobase
synced 2024-11-15 08:21:53 +00:00
fix(charts): fields undefined bug (#1980)
This commit is contained in:
parent
ad726e6a94
commit
ecb2af8fd6
@ -8,7 +8,7 @@ const useFieldsById = (queryId: number) => {
|
||||
const chartQueryList = ctx?.data;
|
||||
if (chartQueryList && Array.isArray(chartQueryList)) {
|
||||
const currentQuery = chartQueryList.find((chartQuery) => chartQuery.id === queryId);
|
||||
setFields(currentQuery?.fields);
|
||||
setFields(currentQuery?.fields || []);
|
||||
}
|
||||
}, [queryId]);
|
||||
return {
|
||||
|
Loading…
Reference in New Issue
Block a user