Fix old ingredients reference

This commit is contained in:
Christopher C. Wells 2021-01-22 23:58:45 -08:00 committed by Christopher Charbonneau Wells
parent 1c420bc624
commit e335c249d8
1 changed files with 1 additions and 1 deletions

View File

@ -36,7 +36,7 @@ trait HasIngredients
*/
private function sumNutrient(string $nutrient): float {
$sum = 0;
foreach ($this->ingredients as $ingredientAmount) {
foreach ($this->ingredientAmounts as $ingredientAmount) {
$sum += $ingredientAmount->{$nutrient}();
}
return $sum;