From 9ede2d3feee9d03ac5e790b60f25f5dc060f90ce Mon Sep 17 00:00:00 2001 From: Kamil Gabryjelski Date: Tue, 8 Mar 2022 20:13:16 +0100 Subject: [PATCH] fix undefined --- .../src/dashboard/util/activeDashboardFilters.js | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/superset-frontend/src/dashboard/util/activeDashboardFilters.js b/superset-frontend/src/dashboard/util/activeDashboardFilters.js index f72e016fbac80..0ad7f76076e12 100644 --- a/superset-frontend/src/dashboard/util/activeDashboardFilters.js +++ b/superset-frontend/src/dashboard/util/activeDashboardFilters.js @@ -69,10 +69,12 @@ export function getChartIdsInFilterScope(filterScope, charts, layout) { layoutItems .find( layoutItem => - layoutItem.type === CHART_TYPE && - layoutItem.meta.chartId === chart.id, + layoutItem?.type === CHART_TYPE && + layoutItem.meta?.chartId === chart.id, ) - ?.parents.some(elementId => filterScope.rootPath.includes(elementId)), + ?.parents?.some(elementId => + filterScope.rootPath.includes(elementId), + ), ) .map(chart => chart.id); }