diff --git a/apps/web/pages/auth/passcode.tsx b/apps/web/pages/auth/passcode.tsx index 63ca9f608..e249930fa 100644 --- a/apps/web/pages/auth/passcode.tsx +++ b/apps/web/pages/auth/passcode.tsx @@ -210,9 +210,10 @@ function WorkSpaceScreen({ form, className }: { form: TAuthenticationPasscode } ); useEffect(() => { - if (form.workspaces.length === 1 && form.workspaces[0].current_teams.length === 1) { + if (form.workspaces.length === 1) { setSelectedWorkspace(0); - setSelectedTeam(form.workspaces[0].current_teams[0].team_id); + form.workspaces[0].current_teams.length === 1 && + setSelectedTeam(form.workspaces[0].current_teams[0].team_id); setTimeout(() => { document.getElementById('continue-to-workspace')?.click(); }, 100); @@ -331,7 +332,7 @@ function WorkSpaceScreen({ form, className }: { form: TAuthenticationPasscode }