diff --git a/javascript/ui_settings_hints.js b/javascript/ui_settings_hints.js index d088f9494..6ff17b01e 100644 --- a/javascript/ui_settings_hints.js +++ b/javascript/ui_settings_hints.js @@ -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;