Skip to content

Commit

Permalink
[expo-localization][ios] Fix locale export (#8193)
Browse files Browse the repository at this point in the history
* [expo-localization][ios] Fix locale export

* [danger][bot] Add missing changelog (#8195)
  • Loading branch information
lukmccall committed May 13, 2020
1 parent d091b48 commit ed1edcc
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 2 additions & 0 deletions packages/expo-localization/CHANGELOG.md
Expand Up @@ -7,3 +7,5 @@
### 🎉 New features

### 🐛 Bug fixes

- Fixed `Localization.locale` throwing an exception on the iOS simulator. ([#8193](https://github.com/expo/expo/pull/8193) by [@lukmccall](https://github.com/lukmccall))
Expand Up @@ -21,7 +21,7 @@ @implementation EXLocalization
- (NSDictionary *)constantsToExport
{
NSArray<NSString *> *preferredLocales = [NSLocale preferredLanguages];
if (preferredLocales == nil) {
if (![preferredLocales count]) {
NSString *currentLocale = [[NSLocale currentLocale] localeIdentifier];
if (currentLocale == nil) {
currentLocale = @"en_US";
Expand Down

0 comments on commit ed1edcc

Please sign in to comment.