TypeScript check and typing corrections.

This commit is contained in:
Leo Vasanko
2026-01-30 19:03:37 +00:00
parent 1061c916aa
commit 26b7a8595e
14 changed files with 27 additions and 22 deletions
+2 -2
View File
@@ -145,7 +145,7 @@ const download = async () => {
if (files.length === 1) {
store.selected.clear()
store.error = "Single file via browser downloads"
return linkdl(`/files/${files[0][1]}`)
return linkdl(`/files/${files[0]![1]}`)
}
// Use FileSystem API if multiple files and the browser supports it
if ('showDirectoryPicker' in window) {
@@ -164,7 +164,7 @@ const download = async () => {
}
// Otherwise, zip and download
console.log("Falling back to zip download")
const name = sel.keys.length === 1 ? sel.docs[sel.keys[0]].name : 'download'
const name = sel.keys.length === 1 ? sel.docs[sel.keys[0]!]!.name : 'download'
linkdl(`/zip/${Array.from(sel.keys).join('+')}/${name}.zip`)
store.error = "Downloading as ZIP via browser downloads"
store.selected.clear()