Return empty object if not in locale info (https://github.com/woocommerce/woocommerce-admin/pull/6188)
This commit is contained in:
parent
20b9b60dd2
commit
fc41022dd4
|
@ -113,10 +113,10 @@ const CurrencyFactory = ( currencySetting ) => {
|
|||
localeInfo = {},
|
||||
currencySymbols = {}
|
||||
) {
|
||||
const countryInfo = localeInfo[ countryCode ];
|
||||
const countryInfo = localeInfo[ countryCode ] || {};
|
||||
const symbol = currencySymbols[ countryInfo.currency_code ];
|
||||
|
||||
if ( ! symbol || ! countryInfo ) {
|
||||
if ( ! symbol ) {
|
||||
return {};
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue