mirror of
https://github.com/bitwarden/browser.git
synced 2024-11-22 11:45:59 +01:00
Add default OrganizationUpdateRequest values when FormControls are disabled (#9774)
This commit is contained in:
parent
a0e00f9519
commit
b6c46745a5
@ -153,8 +153,17 @@ export class AccountComponent {
|
||||
}
|
||||
|
||||
const request = new OrganizationUpdateRequest();
|
||||
request.name = this.formGroup.value.orgName;
|
||||
request.billingEmail = this.formGroup.value.billingEmail;
|
||||
|
||||
/*
|
||||
* When you disable a FormControl, it is removed from formGroup.values, so we have to use
|
||||
* the original value.
|
||||
* */
|
||||
request.name = this.formGroup.get("orgName").disabled
|
||||
? this.org.name
|
||||
: this.formGroup.value.orgName;
|
||||
request.billingEmail = this.formGroup.get("billingEmail").disabled
|
||||
? this.org.billingEmail
|
||||
: this.formGroup.value.billingEmail;
|
||||
|
||||
// Backfill pub/priv key if necessary
|
||||
if (!this.org.hasPublicAndPrivateKeys) {
|
||||
|
Loading…
Reference in New Issue
Block a user