Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 4 additions & 5 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,7 @@ class CurrencyConverter {
"FCFA": "Central African CFA Franc",
"CLP": "Chilean Peso",
"CLF": "Chilean Unit of Account (UF)",
"CNY": "Chinese Yuan",
"CNY": "Chinese Yuan (offshore)",
"CNY": ["Chinese Yuan", "Chinese Yuan (offshore)"],
"COP": "Colombian Peso",
"KMF": "Comorian Franc",
"CDF": "Congolese Franc",
Expand Down Expand Up @@ -294,11 +293,11 @@ class CurrencyConverter {
if (rates.includes(","))
rates = this.replaceAll(rates, ",", "")
}
rates = parseFloat(rates) / this.currencyAmount
const rates_number = rates = parseFloat(rates) / this.currencyAmount
if (this.isRatesCaching) {
this.addRateToRatesCache(currencyPair, rates);
this.addRateToRatesCache(currencyPair, rates_number);
}
return rates
return rates_number;
})
}
}
Expand Down