Move supported ingredients handling inside old data loop

This commit is contained in:
Christopher C. Wells 2021-04-12 19:55:55 -07:00
parent ba5ac72db8
commit c9ef13a0d4
1 changed files with 11 additions and 11 deletions

View File

@ -96,7 +96,6 @@ class RecipeController extends Controller
'ingredient_name' => $old['name'][$key],
'detail' => $old['detail'][$key],
];
}
// Add supported units for the ingredient.
$ingredient = NULL;
@ -110,6 +109,7 @@ class RecipeController extends Controller
$ingredients[$key]['units_supported'] = $ingredient->units_supported;
}
}
}
else {
foreach ($recipe->ingredientAmounts as $key => $ingredientAmount) {
$ingredients[] = [