diff --git a/components/utils/index.js b/components/utils/index.js index 9345882..86d9222 100644 --- a/components/utils/index.js +++ b/components/utils/index.js @@ -12,6 +12,8 @@ import currencies from "../json/other/currencies.json"; class Utils { static getMostUsedCurrency(transactions) { + if(transactions == null) { return; } + const currenciesUsed = {}; transactions.forEach((a) => { if (currenciesUsed[a.currency]) {