fix js error at startup

This commit is contained in:
AUTOMATIC1111 2024-01-27 11:35:39 +03:00
parent cf08f5b4d2
commit 816390938f

View File

@ -17,7 +17,10 @@ onOptionsChanged(function() {
if (div.classList.contains('gradio-checkbox')) span = div.querySelector('label span');
else if (div.classList.contains('gradio-checkboxgroup')) span = div.querySelector('span').firstChild;
else if (div.classList.contains('gradio-radio')) span = div.querySelector('span').firstChild;
else span = div.querySelector('label span').firstChild;
else {
var elem = div.querySelector('label span');
if(elem) span = elem.firstChild;
}
if (!span) return;