Fix incorrect destructuring in for loop let initialization (#5763)

* Fix incorrect destructuring in for loop `let` initialization

* Improve approach and fix tests
This commit is contained in:
Buu Nguyen
2017-05-31 12:29:50 -07:00
committed by Henry Zhu
parent 63b7137dac
commit f58f4ac351
7 changed files with 24 additions and 22 deletions

View File

@@ -1,7 +1,7 @@
class AnchorLink extends Component {
render() {
var _props = this.props;
const isExternal = _props.isExternal,
const _props = this.props,
isExternal = _props.isExternal,
children = _props.children;
if (isExternal) {
@@ -10,4 +10,4 @@ class AnchorLink extends Component {
return <Link>{children}</Link>;
}
}
}