Fix mobile display issues (fixes #4)
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user