diff --git a/Libraries/Geolocation/RCTLocationObserver.m b/Libraries/Geolocation/RCTLocationObserver.m index 9f9d57aa247f7d..6ea912e45c1db4 100644 --- a/Libraries/Geolocation/RCTLocationObserver.m +++ b/Libraries/Geolocation/RCTLocationObserver.m @@ -130,7 +130,6 @@ - (void)beginLocationUpdates _locationManager = [CLLocationManager new]; _locationManager.distanceFilter = RCT_DEFAULT_LOCATION_ACCURACY; _locationManager.delegate = self; - _pendingRequests = [NSMutableArray new]; } // Request location access permission @@ -234,6 +233,9 @@ - (void)timeout:(NSTimer *)timer selector:@selector(timeout:) userInfo:request repeats:NO]; + if (!_pendingRequests) { + _pendingRequests = [NSMutableArray new]; + } [_pendingRequests addObject:request]; // Configure location manager and begin updating location