Replace for-in-loop with for-of-loop (suggested by eslint)

This commit is contained in:
Felix Hamme 2019-05-09 14:26:37 +02:00
parent b3243f6a5c
commit a4b1506d41
1 changed files with 3 additions and 5 deletions

View File

@ -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;
}
}