diff --git a/public/viewjs/mealplan.js b/public/viewjs/mealplan.js index 2e7c61cd..e047c364 100644 --- a/public/viewjs/mealplan.js +++ b/public/viewjs/mealplan.js @@ -98,7 +98,7 @@ $("#add-recipe-modal").on("shown.bs.modal", function(e) $(document).on("click", ".remove-recipe-button", function(e) { - var mealPlanEntry = JSON.parse($(this).parent().parent().attr("data-meal-plan-entry")); + var mealPlanEntry = JSON.parse($(this).closest(".fc-h-event").attr("data-meal-plan-entry")); Grocy.Api.Delete('objects/meal_plan/' + mealPlanEntry.id.toString(), { }, function(result)