mirror of
https://github.com/Donkie/Spoolman.git
synced 2026-10-21 17:42:16 -05:00
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:
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>
|
||||
|
||||
Reference in new issue
Block a user