Skip to content

Commit

Permalink
fix: add missing key to scatter lines
Browse files Browse the repository at this point in the history
  • Loading branch information
targos committed Dec 4, 2022
1 parent cc0c784 commit 4e8eabc
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/components/Series/ScatterSeries.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -199,6 +199,8 @@ function ScatterSeriesRender<T extends SeriesPoint = SeriesPoint>({
: undefined;
const PreviousLine = prePoint ? (
<line
// eslint-disable-next-line react/no-array-index-key
key={`markers-${i}-previous`}
x1={0}
y1={0}
x2={xScale(prePoint.x) - xScale(point.x)}
Expand All @@ -208,6 +210,8 @@ function ScatterSeriesRender<T extends SeriesPoint = SeriesPoint>({
) : null;
const NextLine = nextPoint ? (
<line
// eslint-disable-next-line react/no-array-index-key
key={`markers-${i}-next`}
x1={0}
y1={0}
x2={xScale(nextPoint.x) - xScale(point.x)}
Expand Down

0 comments on commit 4e8eabc

Please sign in to comment.