Skip to content

Commit

Permalink
fix: failsafe for missing properties
Browse files Browse the repository at this point in the history
  • Loading branch information
hopetambala committed Oct 25, 2020
1 parent 14817f3 commit 843700f
Showing 1 changed file with 11 additions and 11 deletions.
22 changes: 11 additions & 11 deletions domains/DataCollection/Forms/IdentificationForm/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -62,9 +62,9 @@ const IdentificationForm = ({
const formObject = values;
formObject.surveyingOrganization = surveyingOrganization;
formObject.surveyingUser = surveyingUser;
formObject.latitude = values.location.latitude;
formObject.longitude = values.location.longitude;
formObject.altitude = values.location.altitude;
formObject.latitude = values.location?.latitude || 0;
formObject.longitude = values.location?.longitude || 0;
formObject.altitude = values.location?.altitude || 0;

formObject.dob = `${values.Month || '00'}/${values.Day || '00'}/${values.Year || '0000'}`;

Expand Down Expand Up @@ -120,14 +120,14 @@ const IdentificationForm = ({
{formikProps.isSubmitting ? (
<ActivityIndicator />
) : (
<PaperButton
onPressEvent={formikProps.handleSubmit}
buttonText="Submit"
/>
// <Button icon="human" onPress={formikProps.handleSubmit}>
// <Text>Submit</Text>
// </Button>
)}
<PaperButton
onPressEvent={formikProps.handleSubmit}
buttonText="Submit"
/>
// <Button icon="human" onPress={formikProps.handleSubmit}>
// <Text>Submit</Text>
// </Button>
)}
</View>
)}
</Formik>
Expand Down

0 comments on commit 843700f

Please sign in to comment.