From a39a1a7cec7020cac3114d9ad571c8e7b54ffce9 Mon Sep 17 00:00:00 2001 From: Cohee <18619528+Cohee1207@users.noreply.github.com> Date: Sat, 22 Jun 2024 17:44:08 +0300 Subject: [PATCH] Fix odd-named preset selection via command --- public/scripts/preset-manager.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/public/scripts/preset-manager.js b/public/scripts/preset-manager.js index 42cc7585a..d751c5803 100644 --- a/public/scripts/preset-manager.js +++ b/public/scripts/preset-manager.js @@ -140,7 +140,10 @@ class PresetManager { * @param {string} value Preset option value */ selectPreset(value) { - $(this.select).find(`option[value=${value}]`).prop('selected', true); + const option = $(this.select).filter(function() { + return $(this).val() === value; + }); + option.prop('selected', true); $(this.select).val(value).trigger('change'); }