Skip to content

Commit

Permalink
[charts] Fix tooltip causing crash on data change (#12571)
Browse files Browse the repository at this point in the history
Signed-off-by: Rishi556 <github@rishipanthee.com>
  • Loading branch information
Rishi556 committed Mar 27, 2024
1 parent 5e99aa1 commit e97b715
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ function DefaultChartsItemTooltipContent<T extends ChartSeriesType = ChartSeries
) {
const { series, itemData, sx, classes } = props;

if (itemData.dataIndex === undefined) {
if (itemData.dataIndex === undefined || !series.data[itemData.dataIndex]) {
return null;
}
const { displayedLabel, color } =
Expand Down

0 comments on commit e97b715

Please sign in to comment.