diff --git a/src/NativeCameraModule.ts b/src/NativeCameraModule.ts index 0feed58..fb96b53 100644 --- a/src/NativeCameraModule.ts +++ b/src/NativeCameraModule.ts @@ -21,8 +21,9 @@ if (CameraModule == null) { if (Platform.OS === 'android') message += '\n* Make sure gradle is synced.'; // check if Expo + // @ts-expect-error expo global JSI modules are not typed // 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.appOwnership === 'expo') { // We're running Expo Go