From cde1e90241787aa973a53d548eb5cbf6e2355e1a Mon Sep 17 00:00:00 2001 From: TheThomaas Date: Wed, 16 Sep 2026 14:46:15 +0200 Subject: [PATCH] Update cookcli-recipe-strategy.js --- dist/cookcli-recipe-strategy.js | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/dist/cookcli-recipe-strategy.js b/dist/cookcli-recipe-strategy.js index 9ff4648..98752bc 100644 --- a/dist/cookcli-recipe-strategy.js +++ b/dist/cookcli-recipe-strategy.js @@ -244,14 +244,12 @@ class CookCliRecipeViewStrategy extends HTMLElement { const stepIngredients = (step.items || []).filter((item) => item.type === "ingredient"); if (stepIngredients.length) { const lines = stepIngredients.map((item) => { - const qty = item.quantity + const qty = item.quantity ?? "" ? `${item.quantity.value ?? ""} ${item.quantity.unit ?? ""}`.trim() : ""; - return `- ${qty ? `**${qty}** ` : ""}${item.name}`; + return `- ${qty ? `**${qty}** ` : ""}${item.name ?? ""}`; }); - if (lines.trim() !== "") { - leftCards.push({ type: "markdown", content: lines.join("\n") }); - } + leftCards.push({ type: "markdown", content: lines.join("\n") }); } if (config.timer_entity) {