Skip to content

Commit

Permalink
Fix country utils cache. (#9852)
Browse files Browse the repository at this point in the history
  • Loading branch information
jaynewstrom-stripe authored Jan 3, 2025
1 parent a25a089 commit 9eb16c2
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -110,8 +110,6 @@ object CountryUtils {
return if (currentLocale == cachedCountriesLocale) {
cachedOrderedLocalizedCountries
} else {
cachedCountriesLocale = currentLocale

val localizedCountries = localizedCountries(currentLocale)
cachedOrderedLocalizedCountries = listOfNotNull(
localizedCountries.firstOrNull {
Expand All @@ -123,6 +121,8 @@ object CountryUtils {
.sortedBy { formatNameForSorting(it.name) }
)

cachedCountriesLocale = currentLocale

cachedOrderedLocalizedCountries
}
}
Expand Down

0 comments on commit 9eb16c2

Please sign in to comment.