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) {
|
||||
for(let i = 0; i < teams.length; i++) {
|
||||
if(teams[i].id === id) {
|
||||
return teams[i];
|
||||
for(var team of teams) {
|
||||
if(team.id === id) {
|
||||
return team;
|
||||
}
|
||||
}
|
||||
return null;
|
||||
|
|
|
|||
Loading…
Reference in New Issue