File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -37,8 +37,8 @@ class LocationProvider: NSObject {
3737 }
3838
3939 func getCurrentLocation( _ options: LocationOptions ) -> Void {
40- if locationManager . location != nil {
41- let elapsedTime = ( Date ( ) . timeIntervalSince1970 - locationManager . location! . timestamp. timeIntervalSince1970) * 1000
40+ if let location = locationManager . location {
41+ let elapsedTime = ( Date ( ) . timeIntervalSince1970 - location. timestamp. timeIntervalSince1970) * 1000
4242
4343 #if DEBUG
4444 NSLog ( " RNLocation: elapsedTime= \( elapsedTime) ms, maxAge= \( options. maximumAge) ms " )
@@ -48,7 +48,7 @@ class LocationProvider: NSObject {
4848 #if DEBUG
4949 NSLog ( " RNLocation: returning cached location " )
5050 #endif
51- delegate? . onLocationChange ( self , location: locationManager . location! )
51+ delegate? . onLocationChange ( self , location: location)
5252 return
5353 }
5454 }
You can’t perform that action at this time.
0 commit comments