Skip to content

Commit

Permalink
fix undefined
Browse files Browse the repository at this point in the history
  • Loading branch information
kgabryje committed Mar 8, 2022
1 parent e4862bd commit 9ede2d3
Showing 1 changed file with 5 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Expand Down

0 comments on commit 9ede2d3

Please sign in to comment.