Skip to content

Commit 45c31e9

Browse files
benurbplouc
authored andcommitted
fix(line): make copy of points data before reversing
1 parent 165d8a8 commit 45c31e9

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

packages/line/src/Points.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ const Points = ({ points, symbol, size, borderWidth, enableLabel, label, labelYO
1818
* We reverse the `points` array so that points from the lower lines in stacked lines
1919
* graph are drawn on top. See https://github.com/plouc/nivo/issues/1051.
2020
*/
21-
const mappedPoints = points.reverse().map(point => {
21+
const mappedPoints = points.slice(0).reverse().map(point => {
2222
const mappedPoint = {
2323
id: point.id,
2424
x: point.x,

0 commit comments

Comments
 (0)