Currency code is duplicated when an existing currency code is selected in the sorted list

This commit is contained in:
Merve Karaman 2023-08-15 11:26:50 +03:00
parent 3a081523e8
commit 36daa1cb02

View File

@ -656,12 +656,14 @@ export default {
for (const [key, value] of Object.entries(this.full_options)) {
if (selected == value.key) {
this.sorted_options.push({
index: value.index,
key: value.key,
value: value.value,
level: value.level
});
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
});
}
}
}
}