mirror of
https://github.com/mealie-recipes/mealie.git
synced 2025-10-27 16:24:31 -04:00
fix: Workflow Issues with Deleting Ingredient In Parser (#6230)
This commit is contained in:
@@ -317,12 +317,14 @@ function checkFood(ing: ParsedIngredient) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function nextIngredient() {
|
function nextIngredient() {
|
||||||
|
let nextIndex = state.currentParsedIndex;
|
||||||
if (currentIngShouldDelete.value) {
|
if (currentIngShouldDelete.value) {
|
||||||
parsedIngs.value.splice(state.currentParsedIndex, 1);
|
parsedIngs.value.splice(state.currentParsedIndex, 1);
|
||||||
currentIngShouldDelete.value = false;
|
currentIngShouldDelete.value = false;
|
||||||
}
|
}
|
||||||
|
else {
|
||||||
let nextIndex = state.currentParsedIndex + 1;
|
nextIndex += 1;
|
||||||
|
}
|
||||||
|
|
||||||
while (nextIndex < parsedIngs.value.length) {
|
while (nextIndex < parsedIngs.value.length) {
|
||||||
const current = parsedIngs.value[nextIndex];
|
const current = parsedIngs.value[nextIndex];
|
||||||
@@ -363,6 +365,7 @@ async function parseIngredients() {
|
|||||||
state.allReviewed = false;
|
state.allReviewed = false;
|
||||||
createdUnits.clear();
|
createdUnits.clear();
|
||||||
createdFoods.clear();
|
createdFoods.clear();
|
||||||
|
currentIngShouldDelete.value = false;
|
||||||
nextIngredient();
|
nextIngredient();
|
||||||
}
|
}
|
||||||
catch (error) {
|
catch (error) {
|
||||||
|
|||||||
Reference in New Issue
Block a user