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() {
|
||||
const {children} = this.props;
|
||||
|
||||
for (const i in children) {
|
||||
const c = children[i];
|
||||
|
||||
if (c.props.condition) {
|
||||
return c;
|
||||
for (const child of children) {
|
||||
if (child.props.condition) {
|
||||
return child;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue