mirror of
https://github.com/mealie-recipes/mealie.git
synced 2025-11-30 07:34:10 -05:00
fix: Scaled Ingredients Not Changing to Plural (#2726)
* fixed food/unit not updating to plural when scaled * added test * fixed weird edgecase that appears only after edits --------- Co-authored-by: boc-the-git <3479092+boc-the-git@users.noreply.github.com>
This commit is contained in:
@@ -46,8 +46,8 @@ export function useParsedIngredientText(ingredient: RecipeIngredient, disableAmo
|
||||
}
|
||||
|
||||
const { quantity, food, unit, note } = ingredient;
|
||||
const usePluralUnit = quantity !== undefined && quantity > 1;
|
||||
const usePluralFood = (!quantity) || quantity > 1
|
||||
const usePluralUnit = quantity !== undefined && (quantity * scale > 1 || quantity * scale === 0);
|
||||
const usePluralFood = (!quantity) || quantity * scale > 1
|
||||
|
||||
let returnQty = "";
|
||||
|
||||
|
||||
Reference in New Issue
Block a user