Währungen in Kleinbuchstaben und kleine Fixes

This commit is contained in:
2026-05-29 01:17:34 +02:00
parent f1d88eda64
commit 3631674ee3
8 changed files with 17 additions and 22 deletions

View File

@@ -89,13 +89,11 @@ function createConverter(engine, config) {
if (!normalized || isNaN(normalized)) {
return;
}
const fromCode = (config.fromCurrency || '')
.toUpperCase();
const toCode = (config.toCurrency || '')
.toUpperCase();
const fromRate = fromCode === 'EUR'
const fromCode = config.fromCurrency || '';
const toCode = config.toCurrency || '';
const fromRate = fromCode === 'eur'
? 1 : this.rates[fromCode];
const toRate = toCode === 'EUR'
const toRate = toCode === 'eur'
? 1 : this.rates[toCode];
if (!fromRate || !toRate) {
return;