Skip to content

Commit 57ccfbb

Browse files
committed
chore: optional chaining to avoid throwing errors
1 parent 3953d64 commit 57ccfbb

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

frontend/src/ts/modals/google-sign-up.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ async function hide(): Promise<void> {
5959
LoginPage.enableInputs();
6060
if (getAdditionalUserInfo(signedInUser)?.isNewUser) {
6161
await Ape.users.delete();
62-
await signedInUser.user.delete().catch(() => {
62+
await signedInUser?.user.delete().catch(() => {
6363
//user might be deleted already by the server
6464
});
6565
}

0 commit comments

Comments
 (0)