fix: Use global.expo.modules
for JSI expo modules
This commit is contained in:
parent
0d83a13196
commit
a1af891879
@ -21,8 +21,9 @@ if (CameraModule == null) {
|
|||||||
if (Platform.OS === 'android') message += '\n* Make sure gradle is synced.';
|
if (Platform.OS === 'android') message += '\n* Make sure gradle is synced.';
|
||||||
|
|
||||||
// check if Expo
|
// check if Expo
|
||||||
|
// @ts-expect-error expo global JSI modules are not typed
|
||||||
// eslint-disable-next-line @typescript-eslint/no-unsafe-assignment
|
// eslint-disable-next-line @typescript-eslint/no-unsafe-assignment
|
||||||
const ExpoConstants = NativeModules.NativeUnimoduleProxy?.modulesConstants?.ExponentConstants;
|
const ExpoConstants = global.expo?.modules?.ExponentConstants;
|
||||||
if (ExpoConstants != null) {
|
if (ExpoConstants != null) {
|
||||||
if (ExpoConstants.appOwnership === 'expo') {
|
if (ExpoConstants.appOwnership === 'expo') {
|
||||||
// We're running Expo Go
|
// We're running Expo Go
|
||||||
|
Loading…
Reference in New Issue
Block a user