replace .then with async

Signed-off-by: Fredrik Adelöw <freben@gmail.com>
This commit is contained in:
TRIGUBF
2023-08-25 12:25:05 +02:00
committed by Fredrik Adelöw
parent e7f7ba3425
commit f3ba736e7e
@@ -116,10 +116,6 @@ async function downloadDirectoryContents(directoryContents: { path: string; base
await zip.file(d.path, converted);
}
zip.generateAsync({type:"blob"}).then((blob) => {
// Download zip
downloadBlob(blob, name);
}, (err) => {
throw new Error(err);
});
const blob = await zip.generateAsync({type:"blob"});
downloadBlob(blob, name);
}