File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed
packages/charts/src/components/ComposedChart Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -159,8 +159,8 @@ const ComposedChart: FC<ComposedChartProps> = forwardRef((props: ComposedChartPr
159
159
160
160
const onDataPointClickInternal = useCallback (
161
161
( payload , eventOrIndex , event ) => {
162
- if ( payload . name && onDataPointClick ) {
163
- onDataPointClick (
162
+ if ( payload . name ) {
163
+ typeof onDataPointClick === 'function' && onDataPointClick (
164
164
enrichEventWithDetails ( event ?? eventOrIndex , {
165
165
value : payload . value . length ? payload . value [ 1 ] - payload . value [ 0 ] : payload . value ,
166
166
dataIndex : payload . index ?? eventOrIndex ,
@@ -176,7 +176,7 @@ const ComposedChart: FC<ComposedChartProps> = forwardRef((props: ComposedChartPr
176
176
} )
177
177
) ;
178
178
} else {
179
- onDataPointClick (
179
+ typeof onDataPointClick === 'function' && onDataPointClick (
180
180
enrichEventWithDetails (
181
181
{ } ,
182
182
{
You can’t perform that action at this time.
0 commit comments