From c517d2da74e1a183355f7e291e45872e8a2a1de6 Mon Sep 17 00:00:00 2001 From: Steve Date: Sun, 14 Aug 2022 10:53:24 -0600 Subject: [PATCH] fix groupby filter issue --- .../src/filters/components/GroupBy/GroupByFilterPlugin.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/superset-frontend/src/filters/components/GroupBy/GroupByFilterPlugin.tsx b/superset-frontend/src/filters/components/GroupBy/GroupByFilterPlugin.tsx index 9742e27e5908f..091232a5ec3e6 100644 --- a/superset-frontend/src/filters/components/GroupBy/GroupByFilterPlugin.tsx +++ b/superset-frontend/src/filters/components/GroupBy/GroupByFilterPlugin.tsx @@ -71,7 +71,7 @@ export default function PluginFilterGroupBy(props: PluginFilterGroupByProps) { }, [JSON.stringify(defaultValue), multiSelect]); const groupbys = ensureIsArray(formData.groupby).map(getColumnLabel); - const groupby = groupbys[0].length ? groupbys[0] : null; + const groupby = groupbys[0]?.length ? groupbys[0] : null; const withData = groupby ? data.filter(row => groupby.includes(row.column_name as string))