Skip to content

Commit 102d527

Browse files
authored
fix(android): fix condition to NativeEventEmitter (#4041)
1 parent 6785cff commit 102d527

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

src/modules/location/locationManager.ts

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -22,12 +22,10 @@ const MapboxLocationManager: typeof NativeRNMBXLocationModule = Platform.select(
2222
const IsTurbo: boolean =
2323
typeof MapboxLocationManager.onLocationUpdate === 'function';
2424

25-
export const LocationModuleEventEmitter = Platform.select({
26-
ios: new NativeEventEmitter(MapboxLocationManager as any),
27-
android: !IsTurbo
25+
export const LocationModuleEventEmitter =
26+
Platform.OS === 'ios' || (Platform.OS === 'android' && !IsTurbo)
2827
? new NativeEventEmitter(MapboxLocationManager as any)
29-
: null,
30-
});
28+
: null;
3129

3230
/**
3331
* Location sent by locationManager

0 commit comments

Comments
 (0)