fix: avoid warning on first fiat currency selection

This commit is contained in:
Liordino Neto 2020-10-07 18:46:29 -03:00 committed by Josh Harvey
parent b39692e6f7
commit 77043c42ad

View file

@ -106,7 +106,10 @@ const Locales = ({ name: SCREEN_KEY }) => {
const handleSave = it => {
const newConfig = toNamespace(SCREEN_KEY)(it.locale[0])
if (newConfig.locale_fiatCurrency !== config.fiatCurrency)
if (
config.fiatCurrency &&
newConfig.locale_fiatCurrency !== config.fiatCurrency
)
setDataToSave(newConfig)
else save(newConfig)
}