1
0
mirror of https://github.com/bitwarden/browser synced 2025-12-11 13:53:34 +00:00

clear orgId when switching to a personal vault (#16396)

This commit is contained in:
Jordan Aasen
2025-09-16 11:52:46 -07:00
committed by GitHub
parent 4711e51de3
commit 3a6088c187

View File

@@ -926,17 +926,22 @@ export class VaultV2Component<C extends CipherViewLike>
} }
} else if (this.activeFilter.selectedOrganizationId) { } else if (this.activeFilter.selectedOrganizationId) {
this.addOrganizationId = this.activeFilter.selectedOrganizationId; this.addOrganizationId = this.activeFilter.selectedOrganizationId;
} else {
// clear out organizationId when the user switches to a personal vault filter
this.addOrganizationId = null;
} }
if (this.activeFilter.selectedFolderId && this.activeFilter.selectedFolder) { if (this.activeFilter.selectedFolderId && this.activeFilter.selectedFolder) {
this.folderId = this.activeFilter.selectedFolderId; this.folderId = this.activeFilter.selectedFolderId;
} }
if (this.addOrganizationId && this.config) { if (this.config == null) {
this.config.initialValues = { return;
...this.config.initialValues,
organizationId: this.addOrganizationId as OrganizationId,
};
} }
this.config.initialValues = {
...this.config.initialValues,
organizationId: this.addOrganizationId as OrganizationId,
};
} }
private async canNavigateAway(action: string, cipher?: CipherView) { private async canNavigateAway(action: string, cipher?: CipherView) {