From b1b513b527eddae1d96abf2060aebd3a7e3651eb Mon Sep 17 00:00:00 2001 From: Nick Krantz <125900171+nick-livefront@users.noreply.github.com> Date: Thu, 10 Jul 2025 10:09:42 -0500 Subject: [PATCH] when a colleciton is deleted, always refresh ciphers (#15549) --- .../organizations/collections/vault.component.ts | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/apps/web/src/app/admin-console/organizations/collections/vault.component.ts b/apps/web/src/app/admin-console/organizations/collections/vault.component.ts index 9c2293889e3..1956498322b 100644 --- a/apps/web/src/app/admin-console/organizations/collections/vault.component.ts +++ b/apps/web/src/app/admin-console/organizations/collections/vault.component.ts @@ -1138,10 +1138,11 @@ export class VaultComponent implements OnInit, OnDestroy { message: this.i18nService.t("deletedCollectionId", collection.name), }); + // Clear the cipher cache to clear the deleted collection from the cipher state + await this.cipherService.clear(); + // Navigate away if we deleted the collection we were viewing if (this.selectedCollection?.node.id === collection.id) { - // Clear the cipher cache to clear the deleted collection from the cipher state - await this.cipherService.clear(); void this.router.navigate([], { queryParams: { collectionId: this.selectedCollection.parent?.node.id ?? null }, queryParamsHandling: "merge",