Skip to content

Commit

Permalink
Fix undefined dateOfBirth (#86)
Browse files Browse the repository at this point in the history
# Fix undefined dateOfBirth

## ♻️ Current situation & Problem
If `dateOfBirth` is `undefined`, Firestore throws an error.


## ⚙️ Release Notes 
* Fix undefined dateOfBirth


### Code of Conduct & Contributing Guidelines 

By submitting creating this pull request, you agree to follow our [Code
of
Conduct](https://github.com/StanfordBDHG/.github/blob/main/CODE_OF_CONDUCT.md)
and [Contributing
Guidelines](https://github.com/StanfordBDHG/.github/blob/main/CONTRIBUTING.md):
- [x] I agree to follow the [Code of
Conduct](https://github.com/StanfordBDHG/.github/blob/main/CODE_OF_CONDUCT.md)
and [Contributing
Guidelines](https://github.com/StanfordBDHG/.github/blob/main/CONTRIBUTING.md).
  • Loading branch information
arkadiuszbachorski authored Nov 4, 2024
1 parent 1a60736 commit 3fe8244
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion routes/~_dashboard/~patients/~$id/~index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ const PatientPage = () => {
invitationCode: form.invitationCode,
clinician: form.clinician,
organization: clinician.organization,
dateOfBirth: form.dateOfBirth?.toISOString(),
dateOfBirth: form.dateOfBirth?.toISOString() ?? null,
}
if (resourceType === 'user') {
await callables.updateUserInformation({
Expand Down

0 comments on commit 3fe8244

Please sign in to comment.