client_v2: fix crash inspecting a spool of a colorless filament

A filament with neither color_hex nor multi_color_hexes maps to an empty
colors array, and the spool inspector's color-hex row indexed [0]
unconditionally, throwing on render. Show the usual "—" placeholder
instead.

Claude-Session: https://claude.ai/code/session_014Cwk5Yyze9yPvkYkUtMAP4
This commit is contained in:
Donkie committed 2026-07-19 10:18:35 +02:00
1 parent 5bd4fa594d
commit c90cf9eb43
1 file changed
+1 -1
@@ -332,7 +332,7 @@
<span class="mono"
>{filament.colors.length > 1
? m['inspector.multi']({ count: filament.colors.length })
: filament.colors[0].toUpperCase()}</span
: (filament.colors[0]?.toUpperCase() ?? '—')}</span
>
</span>
</Field>