diff --git a/client/src/app/features/recipes/recipe-details/recipe-details.component.ts b/client/src/app/features/recipes/recipe-details/recipe-details.component.ts index a03055c..097788d 100644 --- a/client/src/app/features/recipes/recipe-details/recipe-details.component.ts +++ b/client/src/app/features/recipes/recipe-details/recipe-details.component.ts @@ -278,11 +278,13 @@ export class RecipeDetailsComponent implements OnInit { // check length of toppinglist console.log("tpl length", this.tpl.length, "original length", (this.rawRecipe! as any).ToppingSet.length); - for(let ti = 0; ti < this.tpl.length; ti++){ // check at the same index if(!isEqual(this.tpl[ti][0], (this.rawRecipe as any).ToppingSet[ti])){ console.log('topping list changed', ti, this.tpl[ti][0], (this.rawRecipe as any).ToppingSet[ti]); + // update raw recipe + (this.rawRecipe as any).ToppingSet[ti] = this.tpl[ti][0]; + console.log('after update topping', (this.rawRecipe as any).ToppingSet[ti]); } }