Replace for-in-loop with for-of-loop (suggested by eslint)
This commit is contained in:
parent
b3243f6a5c
commit
a4b1506d41
|
|
@ -33,11 +33,9 @@ export class UserRestrictor extends React.Component {
|
||||||
render() {
|
render() {
|
||||||
const {children} = this.props;
|
const {children} = this.props;
|
||||||
|
|
||||||
for (const i in children) {
|
for (const child of children) {
|
||||||
const c = children[i];
|
if (child.props.condition) {
|
||||||
|
return child;
|
||||||
if (c.props.condition) {
|
|
||||||
return c;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue