Fix for script load if no third party found

Added missing null check
Fixes #87
This commit is contained in:
Dominik Reh
2022-12-19 10:23:34 +01:00
parent 5f8a5d468d
commit 73c3424ab3

View File

@@ -34,6 +34,10 @@ function getTextAreas() {
textAreas = textAreas.concat([...gradioApp().querySelectorAll(entry.selectors.join(", "))]);
} else { // Otherwise, we have to find the text areas by their adjacent labels
let base = gradioApp().querySelector(entry.base);
// Safety check
if (!base) continue;
let allTextAreas = [...base.querySelectorAll("textarea")];
// Filter the text areas where the adjacent label matches one of the selectors