| 696 | return; | 696 | return; |
| 697 | } | 697 | } |
| 698 | | 698 | |
| 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 | } |
| 708 | | 709 | |