mirror of
https://github.com/bitwarden/browser.git
synced 2024-11-11 10:10:25 +01:00
PM-11338: [Defect] Clicking outside of View {Item} dialog should close the dialog properly (#11035)
* Handle undefined result. * Updated enum values for consistency.
This commit is contained in:
parent
6c1d74a4ce
commit
2b85392b0f
@ -886,13 +886,13 @@ export class VaultComponent implements OnInit, OnDestroy {
|
|||||||
const result: ViewCipherDialogCloseResult = await lastValueFrom(dialogRef.closed);
|
const result: ViewCipherDialogCloseResult = await lastValueFrom(dialogRef.closed);
|
||||||
|
|
||||||
// If the dialog was closed by deleting the cipher, refresh the vault.
|
// If the dialog was closed by deleting the cipher, refresh the vault.
|
||||||
if (result.action === ViewCipherDialogResult.Deleted) {
|
if (result?.action === ViewCipherDialogResult.Deleted) {
|
||||||
this.refresh();
|
this.refresh();
|
||||||
this.go({ cipherId: null, itemId: null, action: null });
|
this.go({ cipherId: null, itemId: null, action: null });
|
||||||
}
|
}
|
||||||
|
|
||||||
// If the dialog was closed by any other action (close button, escape key, etc), navigate back to the vault.
|
// If the dialog was closed by any other action (close button, escape key, etc), navigate back to the vault.
|
||||||
if (!result.action) {
|
if (!result?.action) {
|
||||||
this.go({ cipherId: null, itemId: null, action: null });
|
this.go({ cipherId: null, itemId: null, action: null });
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user