Skip to content

Commit

Permalink
fix: set correct default organization
Browse files Browse the repository at this point in the history
  • Loading branch information
HSunboy committed Mar 19, 2024
1 parent 9a65024 commit 11a0c43
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions src/store/login.ts
Original file line number Diff line number Diff line change
Expand Up @@ -277,13 +277,11 @@ export class UserStore {
if (sessionOrganization) {
return sessionOrganization;
}
let personalOrganization: IOrganization = this.organizations?.find(
(item) => item.type === SpaceType.PRIVATE,
);

const firstOrganization = this.organizations?.find(
(item) => item.type === setting.configurations['odc.account.defaultOrganizationType'],
);
let defaultOrganization = firstOrganization || personalOrganization;
let defaultOrganization = firstOrganization || this.organizations?.[0];
return defaultOrganization;
}

Expand Down

0 comments on commit 11a0c43

Please sign in to comment.