asdsa
All checks were successful
Deploy / deploy-staging (push) Successful in 6s
Deploy / deploy-production (push) Has been skipped

This commit is contained in:
2026-05-01 02:53:21 +02:00
parent 6ce45f6d23
commit 29e2724cd8

View File

@@ -220,9 +220,12 @@
const base = String(
settings.display_base_currency || settings.default_base_currency || 'EUR'
).trim().toUpperCase();
const historyCurrencies = preferredCurrencies.filter((currency) => currency !== base);
const selectedCurrencies = preferredCurrencies.length
? preferredCurrencies
: [base];
const historyCurrencies = selectedCurrencies.filter((currency) => currency !== base);
if (!historyCurrencies.length) {
if (!selectedCurrencies.length) {
renderHistory([], []);
return;
}
@@ -244,7 +247,7 @@
byDate.set(key, {
sortKey: key,
label: row?.fetched_at_display || row?.fetched_at || row?.rate_date || key,
rates: {},
rates: base !== '' ? { [base]: 1 } : {},
});
}
const entry = byDate.get(key);
@@ -257,7 +260,7 @@
const mergedRows = Array.from(byDate.values())
.sort((left, right) => String(left.sortKey).localeCompare(String(right.sortKey)));
renderHistory(mergedRows, historyCurrencies);
renderHistory(mergedRows, selectedCurrencies);
};
const calculateConversion = async () => {
@@ -307,9 +310,7 @@
loadLatest().catch(() => {});
loadHistory().catch(() => {
renderHistory([], preferredCurrencies.filter((currency) => currency !== String(
settings.display_base_currency || settings.default_base_currency || 'EUR'
).trim().toUpperCase()));
renderHistory([], preferredCurrencies);
});
calculateConversion().catch(() => {});
})();