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

View File

@ -654,16 +654,18 @@ 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)) {
this.sorted_options.push({ if (selected == value.key && ! current_sorted_option) {
index: value.index, this.sorted_options.push({
key: value.key, index: value.index,
value: value.value, key: value.key,
level: value.level value: value.value,
}); level: value.level
} });
} }
} }
} }