From e09b5aeb783254869470a2231e40f3d2cbdfc71c Mon Sep 17 00:00:00 2001 From: Hillel Coren Date: Fri, 21 Sep 2018 17:04:46 +0300 Subject: [PATCH] Dashboard --- lib/utils/formatting.dart | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/lib/utils/formatting.dart b/lib/utils/formatting.dart index 907b71718..73a0c2334 100644 --- a/lib/utils/formatting.dart +++ b/lib/utils/formatting.dart @@ -73,6 +73,10 @@ String formatNumber( final CurrencyEntity currency = state.staticState.currencyMap[currencyId]; final CountryEntity country = state.staticState.countryMap[countryId]; + if (currency == null) { + return ''; + } + String thousandSeparator = currency.thousandSeparator; String decimalSeparator = currency.decimalSeparator; bool swapCurrencySymbol = currency.swapCurrencySymbol;