From 24b890136d51475271712d1b76e75969c80074ed Mon Sep 17 00:00:00 2001 From: Michael Genson <71845777+michael-genson@users.noreply.github.com> Date: Tue, 23 Sep 2025 17:36:49 -0500 Subject: [PATCH] fix: Workflow Issues with Deleting Ingredient In Parser (#6230) --- .../RecipePage/RecipePageParts/RecipePageParseDialog.vue | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/frontend/components/Domain/Recipe/RecipePage/RecipePageParts/RecipePageParseDialog.vue b/frontend/components/Domain/Recipe/RecipePage/RecipePageParts/RecipePageParseDialog.vue index e8bc9cd3c..389ad8a08 100644 --- a/frontend/components/Domain/Recipe/RecipePage/RecipePageParts/RecipePageParseDialog.vue +++ b/frontend/components/Domain/Recipe/RecipePage/RecipePageParts/RecipePageParseDialog.vue @@ -317,12 +317,14 @@ function checkFood(ing: ParsedIngredient) { } function nextIngredient() { + let nextIndex = state.currentParsedIndex; if (currentIngShouldDelete.value) { parsedIngs.value.splice(state.currentParsedIndex, 1); currentIngShouldDelete.value = false; } - - let nextIndex = state.currentParsedIndex + 1; + else { + nextIndex += 1; + } while (nextIndex < parsedIngs.value.length) { const current = parsedIngs.value[nextIndex]; @@ -363,6 +365,7 @@ async function parseIngredients() { state.allReviewed = false; createdUnits.clear(); createdFoods.clear(); + currentIngShouldDelete.value = false; nextIngredient(); } catch (error) {