Use smaller scope for variables
This commit is contained in:
parent
303f774989
commit
b0b6fb84e0
|
|
@ -181,9 +181,9 @@ class CreateTournamentForm extends React.Component {
|
||||||
}
|
}
|
||||||
|
|
||||||
createTeamArray(teamnames) {
|
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] };
|
result[i] = { 'name': teamnames[i] };
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -279,7 +279,7 @@ class EditTeamNamesForm extends React.Component {
|
||||||
}
|
}
|
||||||
|
|
||||||
handleNameInput(index, input) {
|
handleNameInput(index, input) {
|
||||||
var team = this.state.teams.slice();
|
let team = this.state.teams.slice();
|
||||||
|
|
||||||
team[index].name = input.target.value;
|
team[index].name = input.target.value;
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -363,7 +363,7 @@ function convertGroup(apiGroup) {
|
||||||
}
|
}
|
||||||
|
|
||||||
function convertMatch(apiMatch) {
|
function convertMatch(apiMatch) {
|
||||||
var result = {
|
let result = {
|
||||||
id: apiMatch.id,
|
id: apiMatch.id,
|
||||||
state: apiMatch.state
|
state: apiMatch.state
|
||||||
};
|
};
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue