fixed multi ingerdient parser

This commit is contained in:
vabene1111
2025-04-11 14:47:09 +02:00
parent 675d7a0647
commit 88f2177e9b

View File

@@ -331,12 +331,14 @@ function parseAndInsertIngredients() {
} }
}) })
Promise.allSettled(promises).then(r => { Promise.allSettled(promises).then(r => {
console.log(r)
r.forEach(i => { r.forEach(i => {
console.log(i)
step.value.ingredients.push({ step.value.ingredients.push({
amount: i.amount, amount: i.value.amount,
food: i.food, food: i.value.food,
unit: i.unit, unit: i.value.unit,
note: i.note note: i.value.note
} as Ingredient) } as Ingredient)
}) })
ingredientTextInput.value = "" ingredientTextInput.value = ""