From 41e1d4e7bfe22caabd780c4caf8033e8131fb4e1 Mon Sep 17 00:00:00 2001 From: Brandon Treston Date: Mon, 17 Mar 2025 12:02:09 -0400 Subject: [PATCH] fix showEdit bug (#13853) --- .../vault-item-dialog/vault-item-dialog.component.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/apps/web/src/app/vault/components/vault-item-dialog/vault-item-dialog.component.ts b/apps/web/src/app/vault/components/vault-item-dialog/vault-item-dialog.component.ts index f7169d9dbd4..b2adeecbf69 100644 --- a/apps/web/src/app/vault/components/vault-item-dialog/vault-item-dialog.component.ts +++ b/apps/web/src/app/vault/components/vault-item-dialog/vault-item-dialog.component.ts @@ -233,10 +233,10 @@ export class VaultItemDialogComponent implements OnInit, OnDestroy { * A user may restore items if they have delete permissions and the item is in the trash. */ protected async canUserRestore() { - const featureFlagEnabled = await firstValueFrom(this.limitItemDeletion$); - return this.isTrashFilter && this.cipher?.isDeleted && featureFlagEnabled - ? this.cipher?.permissions.restore - : this.canDelete; + if (await firstValueFrom(this.limitItemDeletion$)) { + return this.isTrashFilter && this.cipher?.isDeleted && this.cipher?.permissions.restore; + } + return this.isTrashFilter && this.cipher?.isDeleted && this.canDelete; } protected showRestore: boolean;