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();
let current_sorted_option = false;
for (const [key, value] of Object.entries(this.full_options)) {
if (selected == value.key) {
if(! this.sorted_options.find((option) => option.key == selected)) {
this.sorted_options.push({
index: value.index,
key: value.key,
value: value.value,
level: value.level
});
}
current_sorted_option = Array.isArray(this.sorted_options) && this.sorted_options.find((option) => option.key == selected);
if (selected == value.key && ! current_sorted_option) {
this.sorted_options.push({
index: value.index,
key: value.key,
value: value.value,
level: value.level
});
}
}
}