Skip to content

Commit cdd4f98

Browse files
Localization.region to get the country (#169)
* 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 <rfraja2943@gmail.com>
1 parent af57075 commit cdd4f98

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

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

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,8 @@ if (process.env.RNVC_ENV === 'test') {
2121
if (Constants.expoVersion < 31) {
2222
country = Localization.getCurrentDeviceCountryAsync();
2323
} else {
24-
country = Localization.country;
24+
// if can't return country use region instead
25+
country = Localization.country ? Localization.country : Localization.region;
2526
}
2627

2728
RNVersionCheck = {

0 commit comments

Comments
 (0)