Skip to content

Commit

Permalink
fix(line): make copy of points data before reversing
Browse files Browse the repository at this point in the history
  • Loading branch information
benurb authored and plouc committed May 10, 2022
1 parent 165d8a8 commit 45c31e9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/line/src/Points.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ const Points = ({ points, symbol, size, borderWidth, enableLabel, label, labelYO
* We reverse the `points` array so that points from the lower lines in stacked lines
* graph are drawn on top. See https://github.com/plouc/nivo/issues/1051.
*/
const mappedPoints = points.reverse().map(point => {
const mappedPoints = points.slice(0).reverse().map(point => {
const mappedPoint = {
id: point.id,
x: point.x,
Expand Down

0 comments on commit 45c31e9

Please sign in to comment.