1
0
mirror of https://github.com/bitwarden/browser synced 2025-12-16 16:23:44 +00:00

when a colleciton is deleted, always refresh ciphers (#15549)

This commit is contained in:
Nick Krantz
2025-07-10 10:09:42 -05:00
committed by GitHub
parent 952b84a011
commit b1b513b527

View File

@@ -1138,10 +1138,11 @@ export class VaultComponent implements OnInit, OnDestroy {
message: this.i18nService.t("deletedCollectionId", collection.name), message: this.i18nService.t("deletedCollectionId", collection.name),
}); });
// 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 // Clear the cipher cache to clear the deleted collection from the cipher state
await this.cipherService.clear(); await this.cipherService.clear();
// Navigate away if we deleted the collection we were viewing
if (this.selectedCollection?.node.id === collection.id) {
void this.router.navigate([], { void this.router.navigate([], {
queryParams: { collectionId: this.selectedCollection.parent?.node.id ?? null }, queryParams: { collectionId: this.selectedCollection.parent?.node.id ?? null },
queryParamsHandling: "merge", queryParamsHandling: "merge",