We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 54ea0f3 commit 995a927Copy full SHA for 995a927
app/External/Model/Ingredient.php
@@ -58,7 +58,7 @@ public static function fromModel(IngredientModel $model, bool $useFileURI = fals
58
})->toArray();
59
60
$defaultIngredientUnits = $model->getDefaultUnits();
61
- if ($model->getDefaultUnits()?->isConvertable()) {
+ if ($model->getDefaultUnits()?->isConvertable() && $toUnits) {
62
$defaultIngredientUnits = new UnitValueObject($toUnits->value);
63
}
64
0 commit comments