Fixed meal plan did not load when a containing recipe was deleted (closes #361)

This commit is contained in:
Bernd Bestel
2019-09-21 09:18:40 +02:00
parent ab44566890
commit 327c1f4fb3
4 changed files with 24 additions and 2 deletions

View File

@@ -59,6 +59,11 @@ var calendar = $("#calendar").fullCalendar({
"eventRender": function(event, element)
{
var recipe = JSON.parse(event.recipe);
if (recipe === null || recipe === undefined)
{
return false;
}
var mealPlanEntry = JSON.parse(event.mealPlanEntry);
var resolvedRecipe = FindObjectInArrayByPropertyValue(recipesResolved, "recipe_id", recipe.id);