1
0
mirror of https://github.com/bitwarden/browser synced 2026-02-07 12:13:45 +00:00

[Account Recovery][PM-18721] use early return

This commit is contained in:
rr-bw
2025-05-28 14:20:14 -07:00
parent 5d7ceac0cb
commit 53d4a14a5e

View File

@@ -761,20 +761,22 @@ export class MembersComponent extends BaseMembersComponent<OrganizationUserView>
if (result === AccountRecoveryDialogResultTypes.Ok) {
await this.load();
}
} else {
const dialogRef = ResetPasswordComponent.open(this.dialogService, {
data: {
name: this.userNamePipe.transform(user),
email: user != null ? user.email : null,
organizationId: this.organization.id,
id: user != null ? user.id : null,
},
});
const result = await lastValueFrom(dialogRef.closed);
if (result === ResetPasswordDialogResult.Ok) {
await this.load();
}
return;
}
const dialogRef = ResetPasswordComponent.open(this.dialogService, {
data: {
name: this.userNamePipe.transform(user),
email: user != null ? user.email : null,
organizationId: this.organization.id,
id: user != null ? user.id : null,
},
});
const result = await lastValueFrom(dialogRef.closed);
if (result === ResetPasswordDialogResult.Ok) {
await this.load();
}
}