diff --git a/packages/core/src/utils/ChartDataUtil.ts b/packages/core/src/utils/ChartDataUtil.ts index e63401804..e7c9e570c 100644 --- a/packages/core/src/utils/ChartDataUtil.ts +++ b/packages/core/src/utils/ChartDataUtil.ts @@ -67,7 +67,7 @@ const isChartProps = (props: ChartProps | any | undefined): props is ChartProps export function getNewChartConfig(innerDimension: any, children: any, existingChartConfig: any[] = []) { return React.Children.map(children, (each) => { - if (each !== undefined && isChartProps(each.props)) { + if (each !== undefined && each !== null && isChartProps(each.props)) { const chartProps = { ...Chart.defaultProps, ...each.props, diff --git a/packages/stories/src/features/axis/Axis.tsx b/packages/stories/src/features/axis/Axis.tsx index 90445114e..97208f8e8 100644 --- a/packages/stories/src/features/axis/Axis.tsx +++ b/packages/stories/src/features/axis/Axis.tsx @@ -54,9 +54,9 @@ class AxisExample extends React.Component { xExtents={xExtents} > - + );