TextgenSettings: Fix JSON schema fallback

Did not fall back if the provided string was empty, resulting in
errors

Signed-off-by: kingbri <bdashore3@proton.me>
This commit is contained in:
kingbri 2024-04-09 22:08:46 -04:00
parent 42e1ade148
commit b8b49f0012
1 changed files with 1 additions and 1 deletions

View File

@ -568,7 +568,7 @@ jQuery(function () {
const json_schema_string = String($(this).val());
try {
settings.json_schema = JSON.parse(json_schema_string ?? '{}');
settings.json_schema = JSON.parse(json_schema_string || '{}');
} catch {
// Ignore errors from here
}