Skip to content
Snippets Groups Projects
Commit c9a3870f authored by Alexis POYEN's avatar Alexis POYEN
Browse files

Fix : already declared var in scope

parent d8076bec
No related branches found
No related tags found
No related merge requests found
Pipeline #6383 passed
......@@ -63,8 +63,8 @@ class ResultGeneralComponent {
candidateList.PartyID == this.parent.results.roundResults[i].ID
);
})
.reduce((electeds, candidateList) => {
return electeds + candidateList.SeatsAttributed;
.reduce((electedsTotal, candidateList) => {
return electedsTotal + candidateList.SeatsAttributed;
}, 0);
document.getElementById(
"round-results"
......
......@@ -150,7 +150,7 @@ class ResultZoneComponent {
if (event.target.id == "select-areas") {
if (event.target.value != 0) {
let area = resultHandler.parent.results.areasResults.find(
(area) => area.ID == event.target.value
(areaFind) => areaFind.ID == event.target.value
);
if (resultHandler.parent.zone === "areas") {
......@@ -165,10 +165,10 @@ class ResultZoneComponent {
}
} else if (event.target.id == "select-sections") {
let area = resultHandler.parent.results.areasResults.find(
(area) => area.ID == document.getElementById("select-areas").value
(areaFind) => areaFind.ID == document.getElementById("select-areas").value
);
let section = area.Sections.find(
(section) => section.ID == event.target.value
(sectionFind) => sectionFind.ID == event.target.value
);
resultHandler.displayZoneResults(section);
resultHandler.sectionDisplayed = section;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment