mirror of
https://github.com/Infisical/infisical.git
synced 2026-01-10 16:08:20 -05:00
Fix: Unable to login after deleting all projects
This commit is contained in:
@@ -219,8 +219,7 @@ export default function Dashboard() {
|
||||
(async () => {
|
||||
if (router.isReady && workspaceId === 'undefined') {
|
||||
router.push('/noprojects');
|
||||
}
|
||||
try {
|
||||
} else try {
|
||||
const { push, query } = router
|
||||
const tempNumSnapshots = await getProjectSercetSnapshotsCount({
|
||||
workspaceId
|
||||
|
||||
@@ -33,7 +33,7 @@ export default function Login() {
|
||||
let userWorkspace;
|
||||
try {
|
||||
const userWorkspaces = await getWorkspaces();
|
||||
userWorkspace = userWorkspaces[0]._id;
|
||||
userWorkspace = userWorkspaces[0] && userWorkspaces[0]._id;
|
||||
router.push(`/dashboard/${userWorkspace}`);
|
||||
} catch (error) {
|
||||
console.log('Error - Not logged in yet');
|
||||
|
||||
Reference in New Issue
Block a user