diff --git a/javascript/ui_settings_hints.js b/javascript/ui_settings_hints.js index 6ff17b01e..c3984bd02 100644 --- a/javascript/ui_settings_hints.js +++ b/javascript/ui_settings_hints.js @@ -14,12 +14,15 @@ onOptionsChanged(function() { if (!commentBefore && !commentAfter) return; var span = null; - 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 { + 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 { var elem = div.querySelector('label span'); - if(elem) span = elem.firstChild; + if (elem) span = elem.firstChild; } if (!span) return;