Use copy instead of new instance.

This commit is contained in:
Alexis Lahouze
2017-08-13 14:17:05 +02:00
parent 13670f0317
commit c3e785122b
2 changed files with 2 additions and 2 deletions
+1 -1
View File
@@ -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;