From 816390938fa36dc7b56fe98e63c714d5fd5c333f Mon Sep 17 00:00:00 2001 From: AUTOMATIC1111 <16777216c@gmail.com> Date: Sat, 27 Jan 2024 11:35:39 +0300 Subject: [PATCH] fix js error at startup --- javascript/ui_settings_hints.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) 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;