diff --git a/superset-frontend/src/dashboard/actions/dashboardState.js b/superset-frontend/src/dashboard/actions/dashboardState.js index fc31a8501abcd..5bfc1dceb5f38 100644 --- a/superset-frontend/src/dashboard/actions/dashboardState.js +++ b/superset-frontend/src/dashboard/actions/dashboardState.js @@ -180,7 +180,7 @@ export function saveDashboardRequest(data, id, saveType) { Object.values(dashboardFilters).forEach(filter => { const { chartId } = filter; const componentId = filter.directPathToFilter.slice().pop(); - const directPathToFilter = (layout[componentId].parents || []).slice(); + const directPathToFilter = (layout[componentId]?.parents || []).slice(); directPathToFilter.push(componentId); dispatch(updateDirectPathToFilter(chartId, directPathToFilter)); });