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:
@@ -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();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user