Skip to content

Commit

Permalink
chore(utils): refactor download
Browse files Browse the repository at this point in the history
  • Loading branch information
nurikk committed Nov 4, 2024
1 parent 56db44d commit 9504d42
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -129,9 +129,8 @@ export const download = async (data: Record<string, unknown>, filename: string)
const {default: JSZip} = await import('jszip');
const zip = new JSZip();
zip.file(filename, JSON.stringify(data, null, 4), { compression: 'DEFLATE' });
zip.generateAsync({ type: "blob" }).then((content) => {
saveAs(content, `${filename}.zip`);
});
const content = await zip.generateAsync({ type: "blob" });
saveAs(content, `${filename}.zip`);
}

export const computeSettingsDiff = (before: object, after: object) => {
Expand Down

0 comments on commit 9504d42

Please sign in to comment.