ui: ignore download if no problem selected

This commit is contained in:
undefined committed 2021-06-15 00:52:35 +08:00
1 parent f95e5452f7
commit fec85985ef
3 files changed
+36 -34

No files matched your search

@@ -196,7 +196,7 @@ async function handleDownload(ev) {
// eslint-disable-next-line no-alert
if (ev.shiftKey) name = prompt('Filename:', name);
const pids = ensureAndGetSelectedPids();
await downloadProblemSet(pids, name);
if (pids) await downloadProblemSet(pids, name);
}
const page = new NamedPage(['problem_main', 'problem_category'], () => {