From 9000fc91fedb8e2109d9de6f11b4955860cf4e08 Mon Sep 17 00:00:00 2001 From: John Mizerek Date: Tue, 3 Mar 2026 19:53:44 -0800 Subject: [PATCH] Fix Show Modifiers button not rendering in template literal Move the conditional out of the nested template literal to avoid parsing issues with arrow functions inside backtick strings. Also skip empty mod-groups divs on items without modifiers. Co-Authored-By: Claude Opus 4.6 --- portal/setup-wizard.html | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/portal/setup-wizard.html b/portal/setup-wizard.html index 84ab8e1..a65a4d1 100644 --- a/portal/setup-wizard.html +++ b/portal/setup-wizard.html @@ -2905,7 +2905,7 @@ ${item.name} ${item.description ? `
${item.description}` : ''} -
${modGroupsHtml}
+ ${modGroupsHtml ? `
${modGroupsHtml}
` : ''} $${parseFloat(item.price || 0).toFixed(2)} @@ -2935,6 +2935,9 @@ itemsHtml += renderCategoryItems(catName, false); } + const hasAnyMods = items.some(it => (it.modifiers || []).length > 0); + const modsBtn = hasAnyMods ? '' : ''; + addMessage('ai', `

I found ${items.length} menu items across your categories:

@@ -2942,7 +2945,7 @@

Uncheck any items you don't want to include.

- ${items.some(it => (it.modifiers || []).length > 0) ? `` : ''} + ${modsBtn}