This commit is contained in:
AUTOMATIC1111 2024-01-27 12:10:37 +03:00
parent cee0bf8464
commit 5e37bf66c1

View File

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