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))