这是indexloc提供的服务,不要输入任何密码
Skip to content

Conversation

@douglowder
Copy link
Contributor

Please verify the following:

  • yarn test jest tests pass with new tests, if relevant
  • yarn lint eslint checks pass with new code, if relevant
  • yarn format:check prettier checks pass with new code, if relevant
  • README.md (or relevant documentation) has been updated with your changes

Describe your PR

On certain older platforms, the systemLocale returned by expo-localization might be invalid, leading to a crash when systemLocale.languageTag or systemLocale.textDirection are referenced. This PR just adds optional chaining for these references and defaults to en-US if there is a problem.

Also changed the default locale from en to en-US to fix an Apple TV issue, but this may have already been dealt with in #2622 .

Reviewers: if desired, we could add console.warn() calls if this condition is encountered, but expo-localization is already writing Android logcats if there are errors.

Copy link
Contributor

@mazenchami mazenchami left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for putting this together! Much appreciated 🚀 🎉

@infinitered-circleci
Copy link
Collaborator

🎉 This PR is included in version 9.4.6 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants