Fix bug non found villages
Some checks failed
Continuous Deployment / lint (push) Successful in 30s
Continuous Deployment / deploy-chrome (push) Failing after 19s
Continuous Deployment / deploy-firefox (push) Successful in 2m1s

This commit is contained in:
2025-12-07 14:12:20 +01:00
parent 9bdd5f784f
commit 3dd67d776b
4 changed files with 10 additions and 8 deletions

View File

@@ -833,10 +833,8 @@ function handleAutoPlanerSubmit(event) {
let doc = parser.parseFromString(xhr.responseText, "text/html");
let mapContainer = doc.getElementById("mapContainer");
let map = mapContainer.getElementsByTagName("table")[1];
let mapRows = map.getElementsByTagName("tr");
let mapRow = mapRows[Math.floor(mapRows.length / 2) - 1];
let mapCells = mapRow.getElementsByTagName("td");
let mapCell = mapCells[Math.floor(mapCells.length / 2) + 1];
let tbody = map.getElementsByTagName("tbody")[0];
let mapCell = tbody.children[6].children[8];
let mapLinks = mapCell.getElementsByTagName("a");
if (mapLinks.length === 0) {
autoPlanerError.textContent = "Opération impossible car le village cible n'existe pas!";