Skip to content

Commit

Permalink
Fix SVG exporting without file ending in Safari
Browse files Browse the repository at this point in the history
  • Loading branch information
jvolker committed Jan 24, 2021
1 parent cbdf507 commit 181972b
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions src/App.vue
Original file line number Diff line number Diff line change
Expand Up @@ -375,10 +375,9 @@ export default {
const url = window.URL.createObjectURL(blob);
const a = document.createElement("a");
a.href = url;
a.download = truncate(
this.text.replace(/[^a-z0-9]/gi, "_").toLowerCase(),
100
); // download file name
a.download =
truncate(this.text.replace(/[^a-z0-9]/gi, "_").toLowerCase(), 100) +
".svg"; // download file name
a.click();
window.URL.revokeObjectURL(url);
},
Expand Down

0 comments on commit 181972b

Please sign in to comment.