Fix mobile display issues (fixes #4)

This commit is contained in:
Maurus Decimus
2026-04-23 15:21:55 +02:00
parent 47fcf1fe08
commit 68f0ca3629
8 changed files with 169 additions and 122 deletions
+7 -1
View File
@@ -25,7 +25,13 @@ export function coerceLabel(value: unknown, fallback: string): string {
if (value == null) return fallback;
if (typeof value === 'string') return value;
if (typeof value === 'number' || typeof value === 'boolean') return String(value);
if (Array.isArray(value)) return value.length > 0 ? value.map((v) => coerceLabel(v, '')).filter(Boolean).join(', ') : fallback;
if (Array.isArray(value))
return value.length > 0
? value
.map((v) => coerceLabel(v, ''))
.filter(Boolean)
.join(', ')
: fallback;
if (typeof value === 'object') {
const keys = Object.keys(value as Record<string, unknown>);
return keys.length > 0 ? keys.join(', ') : fallback;