Merge pull request #3025 from mervekaraman/master
Currency code is duplicated when an existing currency code is selected in the sorted list
This commit is contained in:
commit
8532c07ec5
@ -654,8 +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 (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,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user