Skip to content

Commit

Permalink
fix: add timeout before download
Browse files Browse the repository at this point in the history
  • Loading branch information
Honoka55 committed Feb 28, 2024
1 parent 2f76881 commit 8af8173
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions script.js
Original file line number Diff line number Diff line change
Expand Up @@ -258,8 +258,10 @@ window.onload = () => {
const url = URL.createObjectURL(blob);
a.href = url;
a.download = 'logo.png';
a.click();
URL.revokeObjectURL(url);
setTimeout(() => {
a.click();
URL.revokeObjectURL(url);
}, 100);
});

ctx.clearRect(canvas.width - 210, 0, canvas.width, 20);
Expand Down

0 comments on commit 8af8173

Please sign in to comment.