Change for-loop in findTeam to make it more readable
This commit is contained in:
parent
2ea9668f38
commit
74a1052e25
|
|
@ -1,8 +1,8 @@
|
||||||
|
|
||||||
export function findTeam(teams, id) {
|
export function findTeam(teams, id) {
|
||||||
for(let i = 0; i < teams.length; i++) {
|
for(var team of teams) {
|
||||||
if(teams[i].id === id) {
|
if(team.id === id) {
|
||||||
return teams[i];
|
return team;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return null;
|
return null;
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue