From f3ba736e7e47087ab9b28072c8b40f5c60dd999e Mon Sep 17 00:00:00 2001 From: TRIGUBF Date: Fri, 25 Aug 2023 12:25:05 +0200 Subject: [PATCH] replace .then with async MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Fredrik Adelöw --- .../DryRunResults/DryRunResultsList.tsx | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/plugins/scaffolder/src/components/TemplateEditorPage/DryRunResults/DryRunResultsList.tsx b/plugins/scaffolder/src/components/TemplateEditorPage/DryRunResults/DryRunResultsList.tsx index 2d7f78ac54..11031fc50c 100644 --- a/plugins/scaffolder/src/components/TemplateEditorPage/DryRunResults/DryRunResultsList.tsx +++ b/plugins/scaffolder/src/components/TemplateEditorPage/DryRunResults/DryRunResultsList.tsx @@ -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); }