fix(cloud): satisfy noUncheckedIndexedAccess in categoryMeta fallback

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
Dorian 2026-07-15 10:02:35 +01:00
parent 0cf91136f9
commit df90cdaac9

View File

@ -436,8 +436,9 @@ function categoryOf(nameOrMime: string): Exclude<CategoryId, 'all'> {
return 'documents'
}
const FALLBACK_SECTION: ContentSection = contentSections[2]!
function categoryMeta(cat: Exclude<CategoryId, 'all'>): ContentSection {
return contentSections.find(s => s.id === cat) ?? contentSections[2]
return contentSections.find(s => s.id === cat) ?? FALLBACK_SECTION
}
function formatSize(bytes: number): string {