Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
seadfeng committed Aug 27, 2024
1 parent b05c4e0 commit e501ca0
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/components/frontend/page/home/results.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,11 @@ const downloadImagesAsZip = (icons: { href: string, sizes?: string }[], domain:
const JSZip = JSZipModule.default;
const zip = new JSZip();
const folder = zip.folder(`${domain}-images`);
const saveAs = FileSaverModule.saveAs;
const saveAs = FileSaverModule.default || FileSaverModule.saveAs;
if (typeof saveAs !== 'function') {
console.error('saveAs is not a function', FileSaverModule);
return;
}

const addBase64Image = ({ base64Data, index, sizes }: { base64Data: string; index: number, sizes?: string; }) => {
const data = base64Data.split(',')[1];
Expand Down

0 comments on commit e501ca0

Please sign in to comment.