This commit is contained in:
Merve Karaman 2023-08-15 16:32:55 +03:00
parent 36daa1cb02
commit b13a7a037c

View File

@ -654,9 +654,12 @@ export default {
this.setSortedOptions(); this.setSortedOptions();
let current_sorted_option = false;
for (const [key, value] of Object.entries(this.full_options)) { for (const [key, value] of Object.entries(this.full_options)) {
if (selected == value.key) { current_sorted_option = Array.isArray(this.sorted_options) && this.sorted_options.find((option) => option.key == selected);
if(! this.sorted_options.find((option) => option.key == selected)) {
if (selected == value.key && ! current_sorted_option) {
this.sorted_options.push({ this.sorted_options.push({
index: value.index, index: value.index,
key: value.key, key: value.key,
@ -666,7 +669,6 @@ export default {
} }
} }
} }
}
}, },
removeTag(event) { removeTag(event) {