Skip to content

Commit

Permalink
fix(Highcharts plugin): fix console error on first render with split-…
Browse files Browse the repository at this point in the history
…pane (#355)
  • Loading branch information
korvin89 authored Nov 28, 2023
1 parent 0e80011 commit bc2c1f1
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ function forceHoverState(
if (chartType === 'pie') {
chart.tooltip.refresh(activePoints);
chart.pointsForInitialRefresh = activePoints;
} else if (chart.series.length === 1) {
} else if (chart.series?.length === 1) {
const series = chart.series[0];
const seriesType =
(series && series.type) || (chart.options.chart && chart.options.chart.type);
Expand All @@ -80,8 +80,8 @@ function forceHoverState(
if (chartTypesWithoutCrosshair.indexOf(chartType) === -1) {
const point = Array.isArray(activePoints) ? activePoints[0] : activePoints;

chart.xAxis[0].drawCrosshair(undefined, point);
chart.yAxis[0].drawCrosshair(undefined, point);
chart.xAxis?.[0].drawCrosshair(undefined, point);
chart.yAxis?.[0].drawCrosshair(undefined, point);
}
}

Expand Down

0 comments on commit bc2c1f1

Please sign in to comment.