Skip to content

Commit

Permalink
Localization.region to get the country (#169)
Browse files Browse the repository at this point in the history
* Localization.region to get the country

not tested yet if working or not will update this description after testing

* Update packages/react-native-version-check-expo/src/ExpoVersionInfo.js

Co-authored-by: Mohamad Arif Raja <[email protected]>
  • Loading branch information
FatmaMahmoud698 and rf1804 authored Jun 22, 2022
1 parent af57075 commit cdd4f98
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,8 @@ if (process.env.RNVC_ENV === 'test') {
if (Constants.expoVersion < 31) {
country = Localization.getCurrentDeviceCountryAsync();
} else {
country = Localization.country;
// if can't return country use region instead
country = Localization.country ? Localization.country : Localization.region;
}

RNVersionCheck = {
Expand Down

0 comments on commit cdd4f98

Please sign in to comment.