#3982 CC: Fix visual duplication of presets on renaming

1f7c65b45a1f804e1bb891dde90c1aeeff7d3722

Cohee <18619528+Cohee1207@users.noreply.github.com>

1 files changed, +3 -2Ignore whitespace
public/scripts/preset-manager.js+3 -2
@@ -696,13 +696,14 @@ class PresetManager {
696 return;696 return;
697 }697 }
698698
699 $(this.select).find(`option[value="${value}"]`).remove();
700
701 if (this.isKeyedApi()) {699 if (this.isKeyedApi()) {
700 $(this.select).find(`option[value="${value}"]`).remove();
702 const index = preset_names.indexOf(nameToDelete);701 const index = preset_names.indexOf(nameToDelete);
703 preset_names.splice(index, 1);702 preset_names.splice(index, 1);
704 presets.splice(index, 1);703 presets.splice(index, 1);
705 } else {704 } else {
705 const index = preset_names[nameToDelete];
706 $(this.select).find(`option[value="${index}"]`).remove();
706 delete preset_names[nameToDelete];707 delete preset_names[nameToDelete];
707 }708 }
708709