From 24ccef3abac5641309b25df889fdba4e04ee8c15 Mon Sep 17 00:00:00 2001 From: valadaptive Date: Sun, 3 Dec 2023 15:44:36 -0500 Subject: [PATCH] Fix "settings" variable being shadowed --- public/scripts/textgen-settings.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/public/scripts/textgen-settings.js b/public/scripts/textgen-settings.js index c577c7e09..f79096f36 100644 --- a/public/scripts/textgen-settings.js +++ b/public/scripts/textgen-settings.js @@ -239,12 +239,12 @@ function getCustomTokenBans() { return result.filter(onlyUnique).map(x => String(x)).join(','); } -function loadTextGenSettings(data, settings) { +function loadTextGenSettings(data, loadedSettings) { textgenerationwebui_presets = convertPresets(data.textgenerationwebui_presets); textgenerationwebui_preset_names = data.textgenerationwebui_preset_names ?? []; - Object.assign(settings, settings.textgenerationwebui_settings ?? {}); + Object.assign(settings, loadedSettings.textgenerationwebui_settings ?? {}); - if (settings.api_use_mancer_webui) { + if (loadedSettings.api_use_mancer_webui) { settings.type = MANCER; }