Skip to content

Commit

Permalink
Commenting
Browse files Browse the repository at this point in the history
  • Loading branch information
7emansell committed Nov 25, 2024
1 parent b17b5a1 commit 6570b9f
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/components/MyAccount/NewSettings/UsernameForm.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,11 @@ const UsernameForm = ({ patron, usernameState }: UsernameFormProps) => {
const [isLoading, setIsLoading] = useState(false)
const [isEditing, setIsEditing] = useState(false)
const [error, setError] = useState(false)
/**
* In Sierra, the user NOT having a username is represented by the empty string: username = "".
* Within this form, the user NOT having a username is represented by: username = null, so the
* empty string is an invalid username.
*/
const [input, setInput] = useState(
patron.username === "" ? null : patron.username
)
Expand Down

0 comments on commit 6570b9f

Please sign in to comment.