Skip to content

Commit

Permalink
fix(plugin-chart-table): fix empty metrics (#1047)
Browse files Browse the repository at this point in the history
  • Loading branch information
villebro authored and zhaoyongjie committed Nov 26, 2021
1 parent fcd11cd commit a0d60c0
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ const buildQuery: BuildQuery<TableChartFormData> = (formData: TableChartFormData
options?.hooks?.setCachedChanges({ [formData.slice_id]: queryObject.filters });

const extraQueries: QueryObject[] = [];
if (metrics && formData.show_totals && queryMode === QueryMode.aggregate) {
if (metrics?.length && formData.show_totals && queryMode === QueryMode.aggregate) {
extraQueries.push({
...queryObject,
columns: [],
Expand Down

0 comments on commit a0d60c0

Please sign in to comment.