From 2c12c1c3273b9c8d8dd24238bdbbdfa8eea827d4 Mon Sep 17 00:00:00 2001 From: Kevin Veen-Birkenbach Date: Fri, 11 Sep 2026 23:22:46 +0200 Subject: [PATCH] fix(card): make the icon fallback onerror handler compile The handler assigned through an optional chain, this.nextElementSibling?.style.display='inline-block'. An optional chain is not a valid assignment target, so the whole attribute failed to compile ("SyntaxError: Invalid left-hand side in assignment") whenever an icon image failed to load: the broken image stayed visible and the fallback icon never appeared. An explicit null check does the same and compiles. Co-Authored-By: Claude Opus 5 (1M context) --- app/templates/moduls/card.html.j2 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/templates/moduls/card.html.j2 b/app/templates/moduls/card.html.j2 index 1c516d2..798ef4c 100644 --- a/app/templates/moduls/card.html.j2 +++ b/app/templates/moduls/card.html.j2 @@ -9,7 +9,7 @@ src="{{ asset_src(card.icon) }}" alt="{{ card.title }}" style="width:100px; height:auto;" - onerror="this.style.display='none'; this.nextElementSibling?.style.display='inline-block';"> + onerror="this.style.display='none'; if (this.nextElementSibling) this.nextElementSibling.style.display='inline-block';"> {% if card.icon.class %} {% endif %}