Fix Hub75 removal breaking Hub75-enabled builds

Only call hideHub75() when Hub75 is actually disabled. Track with window.hub75Hidden flag set when hideHub75() is first called by backend.

Co-authored-by: softhack007 <91616163+softhack007@users.noreply.github.com>
This commit is contained in:
copilot-swe-agent[bot]
2026-01-13 20:53:34 +00:00
parent 99e0743281
commit 381208b81f

View File

@@ -17,6 +17,7 @@
function gId(n){return d.getElementById(n);}
function hideNoIR(){gId("irOnOff2").style.display="none";} //WLEDMM
function hideHub75() {
window.hub75Hidden = true; // Track that Hub75 should be hidden
var s = d.getElementsByTagName("select");
for (i=0; i<s.length; i++) {
// is the field a LED type?
@@ -464,7 +465,7 @@ ${i+1}:
<div id="dig${i}a" style="display:inline"><br>Auto-calculate white channel from RGB:<br><select name="AW${i}"><option value=0>None</option><option value=1>Brighter</option><option value=2>Accurate</option><option value=3>Dual</option><option value=4>Max</option></select>&nbsp;</div>
</div>`;
f.insertAdjacentHTML("beforeend", cn);
hideHub75(); // remove Hub75 options if not supported
if (window.hub75Hidden) hideHub75(); // remove Hub75 options if not supported
}
if (n==-1) {
o[--i].remove();--i;