Use privateLat and privateLong to initialize location picker if present (#1111)

This commit is contained in:
Johannes Klein
2024-02-06 22:38:47 +01:00
committed by GitHub
parent db050865d7
commit a2bb7b93cc

View File

@@ -55,8 +55,14 @@ const reducer = ( state, action ) => {
...state.region,
// This was causing a crash when getting to the location picker before
// current location was fetched in the observation viewer
latitude: action.currentObservation?.latitude || 0.0,
longitude: action.currentObservation?.longitude || 0.0,
latitude:
action.currentObservation?.privateLatitude
|| action.currentObservation?.latitude
|| 0.0,
longitude:
action.currentObservation?.privateLongitude
|| action.currentObservation?.longitude
|| 0.0,
latitudeDelta: DELTA,
longitudeDelta: DELTA
}