Skip to content

Commit

Permalink
Merge pull request #200 from ecency/bugfix/199-typeerror-cannot-read-…
Browse files Browse the repository at this point in the history
…properties-of-undefined-reading-email

Fixed NPE
  • Loading branch information
feruzm authored Nov 26, 2024
2 parents ccd2575 + 45db0ce commit 890944e
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,9 @@ export function AccountRecovery() {

const fetchEmail = async () => {
let response = await getRecoveries(activeUser?.username!);
setRecoveryEmail(response[0].email);
if (response[0]) {
setRecoveryEmail(response[0].email);
}
};

useMount(() => {
Expand Down

0 comments on commit 890944e

Please sign in to comment.