Fix failed details not removed

This commit is contained in:
2023-12-25 20:09:38 +08:00
parent 1f326bcf0a
commit 7933a1809d

View File

@@ -396,11 +396,13 @@ export async function download_task(
}
if (e instanceof DOMException) {
if (e.name == "AbortError") {
m.remove_details(i.index);
reject(new TimeoutError());
return;
}
}
if (e instanceof TimeoutError) {
m.remove_details(i.index);
reject(e);
return;
}