mirror of
https://github.com/SillyTavern/SillyTavern.git
synced 2025-06-05 21:59:27 +02:00
#3982 CC: Fix visual duplication of presets on renaming
This commit is contained in:
@ -696,13 +696,14 @@ class PresetManager {
|
||||
return;
|
||||
}
|
||||
|
||||
$(this.select).find(`option[value="${value}"]`).remove();
|
||||
|
||||
if (this.isKeyedApi()) {
|
||||
$(this.select).find(`option[value="${value}"]`).remove();
|
||||
const index = preset_names.indexOf(nameToDelete);
|
||||
preset_names.splice(index, 1);
|
||||
presets.splice(index, 1);
|
||||
} else {
|
||||
const index = preset_names[nameToDelete];
|
||||
$(this.select).find(`option[value="${index}"]`).remove();
|
||||
delete preset_names[nameToDelete];
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user