Only auto-select preset on full name match

This commit is contained in:
Cohee 2024-05-18 16:46:41 +03:00
parent d9f9da99e6
commit 51af830db8
1 changed files with 3 additions and 1 deletions

View File

@ -114,7 +114,9 @@ class PresetManager {
* @returns {any} Preset value
*/
findPreset(name) {
return $(this.select).find(`option:contains(${name})`).val();
return $(this.select).find('option').filter(function() {
return $(this).text() === name;
}).val();
}
/**