Skip to content

Commit

Permalink
style: do not use Array index in keys
Browse files Browse the repository at this point in the history
  • Loading branch information
JeromeLin committed Aug 4, 2020
1 parent 66f5676 commit 3beaf33
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion components/pinch-zoom/index.tsx
Expand Up @@ -203,7 +203,7 @@ export default class PinchZoom extends Component<PinchZoomProps, any> {
const { children, className, prefixCls } = this.props;
const child = React.Children.map(children, (element: JSX.Element, index) => {
return React.cloneElement(element, {
key: index,
key: +index,
onLoad: this.onload,
});
});
Expand Down

0 comments on commit 3beaf33

Please sign in to comment.