Use copy instead of new instance.
This commit is contained in:
parent
13670f0317
commit
c3e785122b
@ -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;
|
||||
|
@ -46,7 +46,7 @@ export class ScheduleEditModalComponent {
|
||||
|
||||
submit(): void {
|
||||
let formModel = this.scheduleForm.form.value;
|
||||
let schedule = new Schedule();
|
||||
let schedule = Object.assign({}, this.schedule);
|
||||
|
||||
schedule.id = this.schedule.id;
|
||||
schedule.start_date = formModel.startDate;
|
||||
|
Loading…
Reference in New Issue
Block a user