Skip to content

Commit 3265048

Browse files
committed
getting rid of the other object.assign
1 parent 055f9d6 commit 3265048

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

example/src/components/randomizedLine.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,10 @@ const Graph = React.createClass({
4747
newData.push(Math.floor(Math.random() * 100));
4848
}
4949

50-
var newDataSet = Object.assign({}, oldDataSet);
50+
var newDataSet = {
51+
...oldDataSet
52+
};
53+
5154
newDataSet.data = newData;
5255

5356
_this.setState({datasets: [newDataSet]});

0 commit comments

Comments
 (0)