1
0
mirror of https://github.com/bitwarden/browser.git synced 2024-12-22 16:29:09 +01:00

[PM-245] Fixed validation on navigate back on browser send add edit (#9605)

* Fixed validation on navigate back on browser send add edit

* simplified expression using nullish-resolution
This commit is contained in:
aj-rosado 2024-06-17 21:38:35 +01:00 committed by GitHub
parent 90d619acb5
commit 26186618f5
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -124,7 +124,8 @@ export class SendAddEditComponent extends BaseAddEditComponent {
cancel() {
// If true, the window was pop'd out on the add-send page. location.back will not work
if ((window as any).previousPopupUrl.startsWith("/add-send")) {
const isPopup = (window as any)?.previousPopupUrl?.startsWith("/add-send") ?? false;
if (!isPopup) {
// FIXME: Verify that this floating promise is intentional. If it is, add an explanatory comment and ensure there is proper error handling.
// eslint-disable-next-line @typescript-eslint/no-floating-promises
this.router.navigate(["tabs/send"]);