Skip to content

Commit

Permalink
4111: dashboard crashes when user profile is incomplete (#2206)
Browse files Browse the repository at this point in the history
* Fix?

* fmt
  • Loading branch information
collinpreston authored May 14, 2024
1 parent 3602434 commit 4c31e6a
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion frontend/public/src/components/forms/ProfileFormFields.js
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,8 @@ const findStates = (country: string, countries: Array<Country>) => {
}

const renderYearOfBirthField = errors => {
const hasError = errors.user_profile && errors.user_profile.year_of_birth
const hasError =
errors && errors.user_profile && errors.user_profile.year_of_birth
return (
<div>
<CardLabel
Expand Down

0 comments on commit 4c31e6a

Please sign in to comment.