Skip to content

Commit 55313e9

Browse files
committed
Fix key error in Toolbar's render method
1 parent a5137b5 commit 55313e9

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

‎src/components/ToolBar.js‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ export default class ToolBar extends React.Component {
2626
}
2727

2828
renderTransformButtons = () => {
29-
return TransformButtons.map(function (option) {
29+
return TransformButtons.map(function (option, i) {
3030
var selected = option.value === this.state.selectedTransform;
3131
var classes = classNames({
3232
button: true,
@@ -35,7 +35,7 @@ export default class ToolBar extends React.Component {
3535
active: selected
3636
});
3737

38-
return <a href='#' title={option.value}
38+
return <a href='#' title={option.value} key={i}
3939
onClick={this.changeTransformMode.bind(this, option.value)}
4040
className={classes}></a>;
4141
}.bind(this));

0 commit comments

Comments
 (0)