From 05d7c3d74d649c27334a23312c67dcd58a33664b Mon Sep 17 00:00:00 2001 From: stevetracvc <70416691+stevetracvc@users.noreply.github.com> Date: Mon, 22 Aug 2022 08:15:33 -0600 Subject: [PATCH] fix(native filters): groupby filter issue (#21084) (cherry picked from commit d79b0bfc744885f6e6f0b5e9a4128c63c1dea58d) --- .../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))