From ecfcaea803ade83dc3634d44fcfbcfb6985b724e Mon Sep 17 00:00:00 2001 From: Ville Brofeldt <33317356+villebro@users.noreply.github.com> Date: Thu, 18 Mar 2021 19:43:41 +0200 Subject: [PATCH] fix(dashboard): missing parents in directPathToFilter (#13691) --- superset-frontend/src/dashboard/actions/dashboardState.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/superset-frontend/src/dashboard/actions/dashboardState.js b/superset-frontend/src/dashboard/actions/dashboardState.js index fc31a8501..5bfc1dceb 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)); });