You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi,
i corrected this issue by using clones, otherwise the original ToppingItem[ ] is modified while preparing the DTO object. createPizzaOrderDto(data: IPizzaFormInterface): IPizzaFormInterface { const order = { customerDetails: this.simpleClone(data.customerDetails), pizzas: this.simpleClone(data.pizzas) };
[...] simpleClone(obj: any) { return Object.assign({}, obj); }
Activity
GuillaumeGSO commentedon May 2, 2019
Hi,
i corrected this issue by using clones, otherwise the original ToppingItem[ ] is modified while preparing the DTO object.
createPizzaOrderDto(data: IPizzaFormInterface): IPizzaFormInterface { const order = { customerDetails: this.simpleClone(data.customerDetails), pizzas: this.simpleClone(data.pizzas) };[...]
simpleClone(obj: any) { return Object.assign({}, obj); }But i'm not allowed to make a pull request...