Skip to content

Commit

Permalink
Fix duplicate variable names (#66)
Browse files Browse the repository at this point in the history
  • Loading branch information
michie1 authored and Michiel Vos committed Jan 12, 2024
1 parent 7839a67 commit 332f539
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions prod/2023/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,29 +27,29 @@ loadRaces();
loadResults();

function loadRiders() {
const riders = Object.keys(riders).map(function(key) {
const data = Object.keys(riders).map(function(key) {
return Object.assign(
{
key: key
},
riders[key]
data[key]
);
});

app.ports.infoForElm.send({
tag: "RidersLoaded",
data: riders
data: data
});
}

function loadRaces() {
const races = Object.keys(races)
const data = Object.keys(races)
.map(function(key) {
return Object.assign(
{
key: key
},
races[key]
data[key]
);
})
.map(race => {
Expand All @@ -59,22 +59,22 @@ function loadRaces() {

app.ports.infoForElm.send({
tag: "RacesLoaded",
data: races
data: data
});
}

function loadResults() {
const results = Object.keys(results).map(function(key) {
const data = Object.keys(results).map(function(key) {
return Object.assign(
{
key: key
},
results[key]
data[key]
);
});
app.ports.infoForElm.send({
tag: "ResultsLoaded",
data: results
data: data
});
}

Expand Down

0 comments on commit 332f539

Please sign in to comment.