1
0
mirror of https://github.com/bitwarden/browser synced 2025-12-10 05:13:29 +00:00

pass the filtered cipher type when creating a new cipher (#11395)

This commit is contained in:
Nick Krantz
2024-10-04 08:47:03 -05:00
committed by GitHub
parent 02993f7018
commit d7d7426431

View File

@@ -627,12 +627,14 @@ export class VaultComponent implements OnInit, OnDestroy {
} }
async addCipher(cipherType?: CipherType) { async addCipher(cipherType?: CipherType) {
const type = cipherType ?? this.activeFilter.cipherType;
if (this.extensionRefreshEnabled) { if (this.extensionRefreshEnabled) {
return this.addCipherV2(cipherType); return this.addCipherV2(type);
} }
const component = (await this.editCipher(null)) as AddEditComponent; const component = (await this.editCipher(null)) as AddEditComponent;
component.type = cipherType || this.activeFilter.cipherType; component.type = type;
if ( if (
this.activeFilter.organizationId !== "MyVault" && this.activeFilter.organizationId !== "MyVault" &&
this.activeFilter.organizationId != null this.activeFilter.organizationId != null