Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[expo-localization][ios] Fix locale export #8193

Merged
merged 2 commits into from May 13, 2020

Conversation

lukmccall
Copy link
Contributor

@lukmccall lukmccall commented May 7, 2020

Why

The previous fix for #5735 was not enough.

How

  • NSLocale preferredLanguages] can return an empty array on some simulators (mainly with the new iOS version).

Test Plan

  • export const locale = parseLocale(ExpoLocalization.locale); ✅

Changelog

  • [fix][expo-localization] Fixed Localization.locale throwing an exception on the iOS simulator.

@github-actions
Copy link
Contributor

github-actions bot commented May 7, 2020

Native Component List for this branch is ready

@lukmccall
Copy link
Contributor Author

lukmccall commented May 7, 2020

Fails
🚫

📋 Missing Changelog

🛠 Add missing entires to:

🛠 Suggested fixes:

📋 Missing changelog

Apply suggested changes:

diff --git a/packages/expo-localization/CHANGELOG.md b/packages/expo-localization/CHANGELOG.md
index 6a294c6841..40f8edc400 100644
--- a/packages/expo-localization/CHANGELOG.md
+++ b/packages/expo-localization/CHANGELOG.md
@@ -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))

or merge this pull request: #8195

Generated by 🚫 dangerJS against 12ef8ee

@lukmccall lukmccall merged commit ed1edcc into master May 13, 2020
@lukmccall lukmccall deleted the @lukmccall/expo-localization/fix-locale-export branch May 13, 2020 10:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants