mirror of https://github.com/kcal-app/kcal.git
Fix old ingredients reference
This commit is contained in:
parent
1c420bc624
commit
e335c249d8
|
|
@ -36,7 +36,7 @@ trait HasIngredients
|
||||||
*/
|
*/
|
||||||
private function sumNutrient(string $nutrient): float {
|
private function sumNutrient(string $nutrient): float {
|
||||||
$sum = 0;
|
$sum = 0;
|
||||||
foreach ($this->ingredients as $ingredientAmount) {
|
foreach ($this->ingredientAmounts as $ingredientAmount) {
|
||||||
$sum += $ingredientAmount->{$nutrient}();
|
$sum += $ingredientAmount->{$nutrient}();
|
||||||
}
|
}
|
||||||
return $sum;
|
return $sum;
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue