Small check to prevent error during UI restart

Not completely fixed due to gradioApp() stack overflow, but the only thing I can do on my side.
This commit is contained in:
Dominik Reh
2023-03-25 14:01:37 +01:00
parent c08746a2c0
commit 95ebde9fce

View File

@@ -243,6 +243,9 @@ function showResults(textArea) {
function hideResults(textArea) {
let textAreaId = getTextAreaIdentifier(textArea);
let resultsDiv = gradioApp().querySelector('.autocompleteResults' + textAreaId);
if (!resultsDiv) return;
resultsDiv.style.display = "none";
selectedTag = null;
}