Fix for missing middle segment.

This commit is contained in:
Blaž Kristan 2022-01-07 17:48:46 +01:00
parent 6491353a57
commit 10e216da6b

View File

@ -632,7 +632,8 @@ function populateSegments(s)
for (var i = 0; i <= lSeg; i++) {
updateLen(i);
updateTrail(d.getElementById(`seg${i}bri`));
d.getElementById(`segr${i}`).style.display = "none";
let segr = d.getElementById(`segr${i}`);
if (segr) segr.style.display = "none";
}
if (segCount < 2) d.getElementById(`segd${lSeg}`).style.display = "none";
if (!noNewSegs && (cfg.comp.seglen?parseInt(d.getElementById(`seg${lSeg}s`).value):0)+parseInt(d.getElementById(`seg${lSeg}e`).value)<ledCount) d.getElementById(`segr${lSeg}`).style.display = "inline";