Use copy instead of new instance.

This commit is contained in:
Alexis Lahouze committed 2017-08-13 14:17:05 +02:00
1 parent 13670f0317
commit c3e785122b
2 files changed
+2 -2

No files matched your search

+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;