From 730344e326c33f03390c0fa01407aa43a1a526f9 Mon Sep 17 00:00:00 2001 From: vabene1111 Date: Sat, 1 Oct 2022 19:27:09 +0200 Subject: [PATCH] duplicate ingredient to correct location --- vue/src/apps/RecipeEditView/RecipeEditView.vue | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/vue/src/apps/RecipeEditView/RecipeEditView.vue b/vue/src/apps/RecipeEditView/RecipeEditView.vue index 389d92376..ad5bf5d2c 100644 --- a/vue/src/apps/RecipeEditView/RecipeEditView.vue +++ b/vue/src/apps/RecipeEditView/RecipeEditView.vue @@ -577,7 +577,7 @@ {{ $t("Copy_template_reference") }} @@ -1234,9 +1234,9 @@ export default { } }) }, - duplicateIngredient: function (step, ingredient) { + duplicateIngredient: function (step, ingredient, new_index) { delete ingredient.id - step.ingredients.push(ingredient) + step.ingredients.splice(new_index < 0 ? 0 : new_index, 0, ingredient) } }, }