Skip to content

Commit

Permalink
Fixed issue where adding an item on the AC vault throws a null reference
Browse files Browse the repository at this point in the history
  • Loading branch information
gbubemismith committed Sep 20, 2024
1 parent 2aa4922 commit 6985ab9
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions apps/web/src/app/vault/org-vault/vault.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -803,8 +803,12 @@ export class VaultComponent implements OnInit, OnDestroy {
const defaultComponentParameters = (comp: AddEditComponent) => {
comp.organization = this.organization;
comp.organizationId = this.organization.id;
comp.cipherId = cipher.id;
comp.canDeleteCipher = this.canDeleteCipher(cipher);
comp.cipherId = cipher?.id;

if (cipher) {
comp.canDeleteCipher = this.canDeleteCipher(cipher);
}

comp.onSavedCipher.pipe(takeUntil(this.destroy$)).subscribe(() => {
modal.close();
this.refresh();
Expand Down

0 comments on commit 6985ab9

Please sign in to comment.