From 3c30a5812baeff309951d3c44ddb3e6257fe7865 Mon Sep 17 00:00:00 2001 From: Robin Townsend Date: Fri, 14 Jul 2023 12:41:21 -0400 Subject: [PATCH] Fix registration not logging you into the new account --- src/auth/RegisterPage.tsx | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/src/auth/RegisterPage.tsx b/src/auth/RegisterPage.tsx index a486aa46..c49d9b43 100644 --- a/src/auth/RegisterPage.tsx +++ b/src/auth/RegisterPage.tsx @@ -80,11 +80,7 @@ export const RegisterPage: FC = () => { passwordlessUser ); - if (!client || !client.groupCallEventHandler || !setClient) { - return; - } - - if (passwordlessUser) { + if (client && client?.groupCallEventHandler && passwordlessUser) { // Migrate the user's rooms for (const groupCall of client.groupCallEventHandler.groupCalls.values()) { const roomId = groupCall.room.roomId; @@ -107,7 +103,7 @@ export const RegisterPage: FC = () => { } } - setClient({ client: newClient, session }); + setClient?.({ client: newClient, session }); PosthogAnalytics.instance.eventSignup.cacheSignupEnd(new Date()); };