Use smaller scope for variables

This commit is contained in:
Felix Hamme 2019-04-16 14:25:42 +02:00
parent 303f774989
commit b0b6fb84e0
3 changed files with 4 additions and 4 deletions

View File

@ -181,9 +181,9 @@ class CreateTournamentForm extends React.Component {
}
createTeamArray(teamnames) {
var result = [];
let result = [];
for(var i = 0; i < teamnames.length; i++) {
for(let i = 0; i < teamnames.length; i++) {
result[i] = { 'name': teamnames[i] };
}

View File

@ -279,7 +279,7 @@ class EditTeamNamesForm extends React.Component {
}
handleNameInput(index, input) {
var team = this.state.teams.slice();
let team = this.state.teams.slice();
team[index].name = input.target.value;

View File

@ -363,7 +363,7 @@ function convertGroup(apiGroup) {
}
function convertMatch(apiMatch) {
var result = {
let result = {
id: apiMatch.id,
state: apiMatch.state
};