This commit is contained in:
2024-01-24 17:43:05 +08:00
parent 5702a08a1b
commit 211a9f98eb

View File

@@ -67,7 +67,7 @@ export async function download() {
let failed = false let failed = false
const data = [] const data = []
for (let i = 0; i < files.value.length; i++) { for (let i = 0; i < files.value.length; i++) {
if (files.value[i].error) { if (files.value[i].error || !files.value[i].out) {
failed = true failed = true
break break
} else { } else {
@@ -83,7 +83,7 @@ export async function download() {
}) })
} }
} }
if (failed || !data.length) return if (failed) return
const blob = await downloadZip(data).blob() const blob = await downloadZip(data).blob()
saveAs(blob, "testcase.zip") saveAs(blob, "testcase.zip")
} }