diff --git a/vue/src/apps/RecipeEditView/RecipeEditView.vue b/vue/src/apps/RecipeEditView/RecipeEditView.vue index 22911c2d..46ede5b8 100644 --- a/vue/src/apps/RecipeEditView/RecipeEditView.vue +++ b/vue/src/apps/RecipeEditView/RecipeEditView.vue @@ -1084,7 +1084,11 @@ export default { this.$nextTick(() => document.getElementById(`amount_${this.recipe.steps.indexOf(step)}_${step.ingredients.length - 1}`).select()) }, removeIngredient: function (step, ingredient) { - if (confirm(this.$t("delete_confirmation", {source: `"${ingredient.food.name}"`}))) { + let message = this.$t("confirm_delete", {object: this.$t("Ingredient")}) + if (ingredient.food?.name) { + message = this.$t("delete_confirmation", {source: `"${ingredient.food.name}"`}) + } + if (confirm(message)) { step.ingredients = step.ingredients.filter((item) => item !== ingredient) } },