Fix download page total file reducer typing (#670)

This commit is contained in:
shenlan 2025-11-11 14:47:53 +08:00 committed by GitHub
parent 1225c0363f
commit 6854ac32f9

View File

@ -20,7 +20,7 @@ export default function DownloadHome() {
const topLevelDirectories = rootListing?.entries.filter((entry: DirEntry) => entry.type === 'dir') ?? []
const totalCollections = Object.values(sectionsMap).reduce((total, sections) => total + sections.length, 0)
const totalFiles = topLevelDirectories.reduce((total, entry) => {
const totalFiles = topLevelDirectories.reduce((total: number, entry: DirEntry) => {
const listing = findListing(allListings, [entry.name])
return total + (listing ? countFiles(listing, allListings) : 0)
}, 0)