mirror of https://github.com/kcal-app/kcal.git
Correct "serving" unit value check
This commit is contained in:
parent
9cae200c0f
commit
0eae4af7d6
|
|
@ -26,7 +26,7 @@ class Nutrients
|
||||||
if ($fromUnit === 'oz') {
|
if ($fromUnit === 'oz') {
|
||||||
return $amount * 28.349523125 / $food->serving_weight;
|
return $amount * 28.349523125 / $food->serving_weight;
|
||||||
}
|
}
|
||||||
elseif ($fromUnit === 'servings') {
|
elseif ($fromUnit === 'serving') {
|
||||||
return $amount;
|
return $amount;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue