Guard syncPipelineOptions when hybrid radio is removed.
This commit is contained in:
@@ -353,9 +353,11 @@ function escAttr(s){ return esc(s).replace(/"/g,'"'); }
|
||||
function syncPipelineOptions(){
|
||||
const agent=(document.querySelector('input[name="pipeline_mode"]:checked')||{}).value==='agent';
|
||||
const local=document.querySelector('input[name="compute"][value="local"]');
|
||||
if(local){
|
||||
local.disabled=agent;
|
||||
if(agent&&local.checked) document.querySelector('input[name="compute"][value="openrouter"]').checked=true;
|
||||
}
|
||||
}
|
||||
document.querySelectorAll('input[name="pipeline_mode"]').forEach(el=>el.addEventListener('change',syncPipelineOptions));
|
||||
syncPipelineOptions();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user