Fix "settings" variable being shadowed

This commit is contained in:
valadaptive 2023-12-03 15:44:36 -05:00
parent a68505e857
commit 24ccef3aba
1 changed files with 3 additions and 3 deletions

View File

@ -239,12 +239,12 @@ function getCustomTokenBans() {
return result.filter(onlyUnique).map(x => String(x)).join(','); return result.filter(onlyUnique).map(x => String(x)).join(',');
} }
function loadTextGenSettings(data, settings) { function loadTextGenSettings(data, loadedSettings) {
textgenerationwebui_presets = convertPresets(data.textgenerationwebui_presets); textgenerationwebui_presets = convertPresets(data.textgenerationwebui_presets);
textgenerationwebui_preset_names = data.textgenerationwebui_preset_names ?? []; 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; settings.type = MANCER;
} }