Use copy instead of new instance.
This commit is contained in:
@@ -44,7 +44,7 @@ export class AccountEditModalComponent {
|
||||
|
||||
submit(): void {
|
||||
let formModel = this.accountForm.form.value;
|
||||
let account = new Account();
|
||||
let account = Object.assign({}, this.account);
|
||||
|
||||
account.id = this.account.id;
|
||||
account.name = formModel.name;
|
||||
|
||||
Reference in New Issue
Block a user